javascript - Textarea is not getting focus when modal jQuery UI dialog has opened -
When I try to click on textarea with id "customNotepad" then this focus is not happening when using the UI dialog has been opened. However, I am able to resize the texture When I click the div with the ID "Header" it is also giving a warning.
#customNotepad {z-index: 1002! Important; Position: Absolute! Important; } #notext {z-index: 1000; }
& lt ;; Doctype html & gt; & Lt; Html lang = "en" & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; JQuery UI dialog - default functionality & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "// code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> & Lt; Script src = "// code.jquery.com/jquery-1.10.2.js"></script> & Lt; Script src = "// code.jquery.com/ui/1.11.2/jquery-ui.js"></script> & Lt; Link rel = "stylesheet" href = "/ resources / demos / style.css" & gt; & Lt; Script & gt; $ (Function () {$ ("#dialog") .dialog ({modal: true});}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = customNotepad & gt; Div id = "header" & gt; & Lt; Span id = "btn" onclick = {warning ()}> gt; Clrbutton & lt; / Span & gt; & Lt; Span id = "" & gt; Title & lt; / Span & gt; & Lt; / Div & gt; & Lt; Div id = "notepad content" & gt; & Lt; Textarea maxlength = "150" id = "note text" style = "width: 100%; height: 100%;" & Gt; & Lt; / Textarea & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "dialog" title = "basic dialog" & gt; & Lt; P & gt; This is the default dialog that is useful for displaying information. The dialog window can be moved, resized and closed with the 'X' icon. & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
It's simply impossible to define According to, a normal dialogue page does not allow contact with other elements.
If you want to be able to use Textera, just do not make it a model.
I do not really see any benefit for a division dialogue here, and some losses.
Reference:
Comments
Post a Comment