New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox - jQuery dialog with modal affecting the input of the colorpicker #40
Comments
Thanks for posting a fiddle with this case. To be clear, are you saying you can't click into the textbox and type in a new color? If so, which browser are you in (it seems to work for me in Chrome). |
I'm using Firefox |
Definitely something to do with |
For instance, something like this: |
Hmm I'm seeing some other focus problems in FF (not even inside of modal). I'll take a look at it and see if I can figure anything out. |
I've fixed the general text selection issue in FF by using |
This works here (when not in dialog): http://jsfiddle.net/9bLJK/4/. Still not working with the modal, probably something to do with the modal overlay styling... |
Still can't edit the textbox if its within a dialog in FireFox. I believe bgrins is on the right track about the modal. |
Updated the fiddle to latest version of jQuery UI and spectrum, still appears to be a problem: http://jsfiddle.net/9bLJK/10/ |
I stumbled across the fix for this while trying to add this onto my own project. For some reason the dialog doesn't like the large number as the z-index on .sp-container, so I changed it to 9999 (or anything that is higher than the jquery ui) and it worked. |
@dbeilharz good observation. I narrowed it down an actual z-index value that it breaks on: |
@bgrins Yes, I didn't have time to test which z-index value it breaks on but in your jsfiddle and my project it does break on any number higher than 9999994. Thanks for the great colorpicker by the way, it was very easy to implement and has all the functionality I needed 👍 |
This is fixed by: 0355f46 |
This seems to be an issue again with jQuery UI 1.10.3. I threw together an example much like your Fiddle and it works with 1.9.2, but if I swap it with 1.10.3 (full), I can't focus/edit the input. EDIT: _allowInteraction: function( event ) { It works if I hack that function to also allow "sp-container": if ( Not sure what this would mean for spectrum... perhaps an option to specify a parent element for the picker container? |
I'm not exactly sure. Do you mean wrapping it inside of a dialog, add adding the ui-dialog class to the container? You could already do the latter with (currently undocumented) |
I can whip together a quick repro over the weekend if you need it. The issue is described here though: Since .sp-container isn't a child of the modal it falls under this scenario. The path of least resistance for me -- and maybe for spectrum as well -- was just to redefine the dialog widget to explicitly allow interaction with .sp-container:
|
I've had the same problem, chrome 36.0.1985.143 (sorry, not tested elsewhere), jquery 2.1.0, jqueryui 1.10.3. Based on digdugpooka 's comment and link I fixed the problem with:
|
Thanks for tracking that down and sharing your solutions |
I realize that this is an old issue, but I tried removing tabindex="-1" from the modal attributes and everything worked fine. I hope this is helpful for others. |
If you place the colorpicker inside the dialog with modal enabled, you cannot click in the input box to change the color. See fiddle http://jsfiddle.net/9bLJK/1/
The text was updated successfully, but these errors were encountered: