Closed
Bug 805516
Opened 14 years ago
Closed 13 years ago
HTML Select Elements are not opening up
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: lavanya.deepak, Unassigned)
Details
Attachments
(3 files, 2 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Steps to reproduce:
I have a simple <select> element in my page. In ready method I add values to the same. Now when I click the arrow it should open the dropdown right? It is not opening up. It used to open normally till Firefox previous versions and after Help -> About -> Apply Update things stopped working.
Works fine with IE/Chrome.
Actual results:
I have a simple <select> element in my page. In ready method I add values to the same. Now when I click the arrow it should open the dropdown right? It is not opening up. It used to open normally till Firefox previous versions and after Help -> About -> Apply Update things stopped working.
Works fine with IE/Chrome.
Expected results:
It should work normally.
| Reporter | ||
Updated•14 years ago
|
Severity: normal → blocker
| Reporter | ||
Updated•14 years ago
|
Component: Untriaged → General
Updated•14 years ago
|
Severity: blocker → normal
Comment 2•14 years ago
|
||
Does this issue reproduce with a clean profile or in safe mode?
http://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile
http://support.mozilla.com/kb/Safe+Mode
Please give a link or attach a test case where this issue reproduces.
Flags: needinfo?(vdeepakkumar)
| Reporter | ||
Comment 3•14 years ago
|
||
Yes. I did a clean uninstall (including all data of Firefox) and re-installed afresh.
Another route I had verified:
Install an older version of Firefox. Navigate to the application. (Worked Fine).
Now click Help -> About -> Apply Update -> Restart Firefox.
Firefox 16.1 : Failed.
Flags: needinfo?(vdeepakkumar)
Comment 4•14 years ago
|
||
Deepak, you said "I have a simple <select> element in my page".
Where is your page? Please give us a link to your page.
If it's not available on the public web, then upload a small HTML file
containing the faulty <select> that we can use to investigate the problem.
(use the "Add an attachment" link on the bug report to upload the file)
Thanks.
Flags: needinfo?(vdeepakkumar)
| Reporter | ||
Comment 5•13 years ago
|
||
Sorry for the delay. I have figured out the issue. It is a similar one to the issue reported here: http://forum.jquery.com/topic/jquery-ui-sortable-disableselection-firefox-issue-with-inputs
I had one line in ready function as
$('DIV').disableSelection();
which was causing the dropdowns to become inactive. I am still wondering how come it is able to work in all browsers including firefox up to 16.1 and stop all of a sudden in 16.2?
Flags: needinfo?(vdeepakkumar)
| Reporter | ||
Updated•13 years ago
|
Severity: normal → blocker
Comment 6•13 years ago
|
||
From the jquery thread above I'm guessing it boils down to something
like this? Although, this doesn't work in Firefox 15 either, so perhaps
the change in behavior you are seeing is that you updated to a newer
jQuery version?
Comment 8•13 years ago
|
||
Olli, Boris, should onmousedown="event.stopImmediatePropagation();" prevent us
from showing the combobox dropdown menu? (see testcase)
Component: General → Layout: Form Controls
Product: Firefox → Core
| Reporter | ||
Comment 9•13 years ago
|
||
(In reply to Mats Palmgren [:mats] from comment #7)
> Deepak, stop changing the Severity please.
Sorry for the inadvertent change, Mats.
| Reporter | ||
Comment 10•13 years ago
|
||
(In reply to Mats Palmgren [:mats] from comment #6)
> Created attachment 681632 [details]
> testcase
>
> From the jquery thread above I'm guessing it boils down to something
> like this? Although, this doesn't work in Firefox 15 either, so perhaps
> the change in behavior you are seeing is that you updated to a newer
> jQuery version?
No Mats. My page is using jquery 1.7.2.js in all the scenarios. When the page is served to Firefox 15 things look good. Do Help -> About and let it update the browser. Now when the browser restart, the dropdown will appear. Firebug will also indicate it is not disabled. But you can not do anything on the dropdown. It would be frozen.
Comment 11•13 years ago
|
||
Comment on attachment 681632 [details]
testcase
Ok, so $('DIV').disableSelection(); does something different from the testcase.
Attachment #681632 -
Attachment is obsolete: true
Comment 12•13 years ago
|
||
http://code.jquery.com/ui/1.7.2/jquery-ui.js
disableSelection: function() {
return this
.attr('unselectable', 'on')
.css('MozUserSelect', 'none')
.bind('selectstart.ui', function() { return false; });
},
I haven't checked, but I'm guessing that .bind('selectstart.ui'... translates
to onmousedown="return false;"
| Reporter | ||
Comment 13•13 years ago
|
||
I would also like to share the thread (http://stackoverflow.com/questions/2700000/how-to-disable-text-selection-using-jquery) for your reference on selectstart.ui issue.
Comment 14•13 years ago
|
||
The text is not selectable, but the combobox menu still opens when I click
on it. Deepak, can you modify this test so that it demonstrates the problem
and upload it, or provide a URL for a page that doesn't work. Thanks.
| Reporter | ||
Comment 15•13 years ago
|
||
I have attached the file which fails Firefox 16.0.2.
Changelog:
1) Jquery file versions change
2) Instead of onLoad I am triggering the startup functions through ready.
Comment 16•13 years ago
|
||
Comment on attachment 681966 [details]
Failure Case for Firefox 16.0.2
disableSelection in jquery-ui 1.8.21 is very different from jquery-ui 1.7.2
quoted above.
http://code.jquery.com/ui/1.8.21/jquery-ui.js
disableSelection: function() {
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
".ui-disableSelection", function( event ) {
event.preventDefault();
});
},
Attachment #681966 -
Attachment mime type: text/plain → text/html
Comment 17•13 years ago
|
||
Since we don't support onselectstart I think this is what disableSelection()
results in. Note that this doesn't work in Chrome either.
Comment 18•13 years ago
|
||
Chrome does support onselectstart so this is what disableSelection()
results in this case. This disables text selection with the <select>
still working, which I assume is the desired result.
Attachment #681686 -
Attachment is obsolete: true
Comment 19•13 years ago
|
||
Firefox handles the given example correctly, this is not a bug.
Please file a bug at jquery.com to fix disableSelection() for browsers that
do not have support for onselectstart (unless already filed).
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 20•13 years ago
|
||
But how come the same works fine in every other browser and even upto Firefox 16.0.1?
Comment 21•13 years ago
|
||
Related:
Old bug about onselectstart: https://bugzilla.mozilla.org/show_bug.cgi?id=688599
jQuery UI bug filed by Boris: http://bugs.jqueryui.com/ticket/7735
.disableSelection() was deprecated in jQuery UI: http://bugs.jqueryui.com/ticket/7755
Comment 22•13 years ago
|
||
> But how come the same works fine in every other browser
Because the page is running different code in different browsers.
> and even upto Firefox 16.0.1?
This is a much more interesting question to me. It seems pretty unlikely that 16.0.1 and 16.0.2 would have different behavior here...
You need to log in
before you can comment on or make changes to this bug.
Description
•