Firefox 35 & 36 on Mac don't select listboxes (html select) created by javascript / jquery, unless I set focus programmatically or I right-click on it.
I am creating a single page app and newly created <select></select> does not work. It seems the problem is these select do not get focus when I click on it. If I (1) set focus programmatically; or, (2) rigth-click on it, it works normally. Firefox 35 / 36 on Mac OSX 10.10.2.
선택된 해결법
Got it!
I was using the jquery-ui's deprecated function .disableSelection() . It should disallow users to select text, but seems to give this collateral effect on FF.
I will try a CSS alternative suggested here .
Thanks!
문맥에 따라 이 답변을 읽어주세요 👍 0모든 댓글 (9)
I've called the big guys to help you. Good luck.
What job does your app do? Any other problems / issues?
Do you have a link to a publicly available page or test case demonstrating the problem? (I could only test on Windows myself.)
Hi, there. I tried to make a simple sample case... but it worked. My application is a backbone based dashboard panel. The problem occurs in some special condition I am trying to replicate. I the following links it was related to jquery.ui.modal window and datepickers. It is not my case, but I guess I am using something similar to modal windows.
I guess to case are related: 1. Select does not open dropdown onclick 2. Month select in datepicker inside a bootstrap-modal won't work in Firefox
If I succeed replicating the case, I will post it here.
Thanks!
글쓴이 floridia 수정일시
선택된 해결법
Got it!
I was using the jquery-ui's deprecated function .disableSelection() . It should disallow users to select text, but seems to give this collateral effect on FF.
I will try a CSS alternative suggested here .
Thanks!
Anyway, the FF behaviour is not fine. Disabling text selection should not disable the dropdowns...
Hi floridia, if you compare the CSS in Firefox's Inspector between your two versions, what rules are being used to disable selection? Some of the proprietary -moz properties can definitely cause problems.
Hi jscher2000,
It seems it works by capturing the event and dropping it out...
From jquery-ui core:
(...) disableSelection: function() { return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" )
Could it be because there is no "selectstart" event, so it uses the "mousedown" instead ?
I didn't find that CSS rules in the inspector...
According to this site , FF and Opera don't have the selectstart event...
floridia said
Could it be because there is no "selectstart" event, so it uses the "mousedown" instead ?
I didn't find that CSS rules in the inspector...
I think that's right.