madrobby / scripty2

scripty2: for a more delicious web
http://scripty2.com/
Other
516 stars 57 forks source link

Dialog content not selectable #5

Closed lasterra closed 14 years ago

lasterra commented 14 years ago

This behavior could be a bug if the content of the Dialog is a form. You only could focus the form elements using tabs, click on they using the mouse is impossible.

sgruhier commented 14 years ago

It'd a default behavior to avoid text selection I guess. Just do

var dialog = new S2.UI.Dialog(...)
S2.UI.enableTextSelection(dialog.element);

I guess an dialog option will be better.

savetheclocktower commented 14 years ago

Good point. It should only disable text selection on the dialog's title bar.

I'll fix this when I get a moment.

lasterra commented 14 years ago

I think it's not a bad idea to disable text in all the dialog when it's an error message or something like that, but I think it should be a prop not a default behavior.

capripot commented 14 years ago

i've added a "selectable" option default to "false" and i set it to "true" when i insert some fields in the dialog (for exemple), to be able to select it

savetheclocktower commented 14 years ago

I removed the handler that prevents mousedown. Now that there's -moz-user-select and -webkit-user-select, it's arguably not even necessary. That should fix this issue.