Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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.

Chosen solution

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!

Read this answer in context 👍 0

All Replies (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!

Modified by floridia

more options

Chosen Solution

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.