Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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.

more options

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.

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)

more options

I've called the big guys to help you. Good luck.

What job does your app do? Any other problems / issues?

more options

Do you have a link to a publicly available page or test case demonstrating the problem? (I could only test on Windows myself.)

more options

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 수정일시

more options

선택된 해결법

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!

more options

Anyway, the FF behaviour is not fine. Disabling text selection should not disable the dropdowns...

more options

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.

more options

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...

more options

According to this site , FF and Opera don't have the selectstart event...

more options

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.