Ticket #3135 (closed bug: worksforme)
Unable to select text in inputs inside dialog (similar to Ticket #3059 )
| Reported by: | mgl | Owned by: | scott.gonzalez |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ui.dialog | Version: | 1.5.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I'm having the same problem as Ticket #3059 with ui 1.5.2 (which is supposed to be fixed). The difference is that this applies to elements inside the container element that dialog is created with. For example, the following will create a dialog with an input element in it:
$('<div>Try for yourself:<br /><input style="width:250px;border:1px solid black;" value="You can\'t touch this" /></div>').dialog({title:"Good luck"});
If you have resizable and/or draggable loaded, you won't be able to use the mouse to put the cursor into the input or select text.
I was able to work around this by changing lines 109 and 129 in ui.dialog.js to the following:
cancel: '.ui-dialog-content,input,textarea',
I'm not sure if this is the best solution, but it works for my case.
Change History
comment:1 Changed 5 years ago by paul
- Owner changed from paul to scott.gonzalez
- Component changed from ui.core to ui.dialog
comment:3 Changed 5 years ago by scott.gonzalez
- Status changed from new to closed
- Resolution set to worksforme
This works for me. The modified cancel option that you provide should not behave any differently from the current cancel option if you are using a current version of UI. The cancel selector is checked against the element and all of its parents, so providing .ui-dialog-content is sufficient.
If you continue to have problems please create a test page and re-open the ticket.

