Last Comment Bug 785773 - Element overlapping another prevents text selection despite having display:none set onmousedown
: Element overlapping another prevents text selection despite having display:no...
Status: UNCONFIRMED
:
Product: Core
Classification: Components
Component: Selection (show other bugs)
: 22 Branch
: x86_64 Linux
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-26 18:24 PDT by Riskable
Modified: 2013-08-06 00:10 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
firefox_onmousedown_bug.html (1.44 KB, text/html)
2012-08-26 18:24 PDT, Riskable
no flags Details

Description Riskable 2012-08-26 18:24:25 PDT
Created attachment 655482 [details]
firefox_onmousedown_bug.html

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.6 (KHTML, like Gecko) Chrome/23.0.1243.2 Safari/537.6

Steps to reproduce:

I've created an entirely transparent textarea that floats above a div in order to afford pasting text into said div (right-click on the text area allows paste which can be captured).  The problem is that this textarea appears to prevent text selection within the div.  This happens despite the textarea having its "style.display = 'none'" when the onmousedown event is called.

I've tested this in Safari (Lion, whatever version that is) and Chrome 21/22.  All browsers *but* Firefox allow the text inside the div to be selected.  I've attached an example which demonstrates this (broken) behavior in Firefox.


Actual results:

Click-and-drag to highlight/select text does not work.  If you double-click-then-drag you can select text.  Also, double-clicking on text in the div works to select individual words.


Expected results:

I should be able to click-and-drag to select text.  The textarea that floats above the div in question has 'display: none' set when the onmousedown event fires on that element.  Therefore, from the perspective of the underlying div it does not exist when the user clicks on it--yet this doesn't appear to be the case.
Comment 1 Loic 2012-08-27 04:50:57 PDT
(In reply to Riskable from comment #0)
> I've tested this in Safari (Lion, whatever version that is) and Chrome
> 21/22.  All browsers *but* Firefox allow the text inside the div to be
> selected.  I've attached an example which demonstrates this (broken)
> behavior in Firefox.

It works fine in Firefox 17 (Nightly) so I think the issue is already fixed and your bug is a dupe.
Screenshot in FF17: http://i.imgur.com/UwQAN.jpg
Comment 2 Loic 2012-08-27 05:37:37 PDT
I have to make a correction.
It works only in the latest Nightly (http://hg.mozilla.org/mozilla-central/rev/b3cce81fef1a) but weirdly. You have to highlight the text a 1st time (it fails) but after that, you can highlight the text normally (and drag&drop).

Changelog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f077de66e52d&tochange=b3cce81fef1a
Comment 3 Riskable 2012-08-27 19:03:54 PDT
As long as it gets fixed (or is already fixed) that's all I care about :)

It is driving the some of my users crazy (users of Gate One).
Comment 4 Riskable 2012-08-29 06:16:04 PDT
I just wanted to add that I updated to Firefox 15 today (Linux) and this bug is still present.
Comment 5 Riskable 2013-08-05 10:11:34 PDT
I just wanted to add that this problem still exists in Firefox 22.  Users are impacted--unable to select text without double-clicking.
Comment 6 jerome.revillard 2013-08-06 00:10:02 PDT
I have the exact same problem in Firefox 22 too.... Can you fix it please.

Note You need to log in before you can comment on or make changes to this bug.