jQuery UI modal dialog captures all keypress so I can't input text inside it

前端 未结 4 723
余生分开走
余生分开走 2021-02-12 14:16

I create modal dialog with form inside it (with some text input). And I just can\'t enter the text inside the textbox. Dialog blocks keyboard input.

Here is my simplifie

4条回答
  •  耶瑟儿~
    2021-02-12 14:36

    You can also lower the z-index of the JQuery dialog:

    var dialog = $('#modal-dialog').dialog({ 
        modal: true,
        zIndex: 500
    });
    

    By default, it is 1000. Of course your relative or absolute positioned elements needing text input need to be greater than the z-index of the dialog still.

提交回复
热议问题