The default bug view has changed. See this FAQ.

Element overlapping another prevents text selection despite having display:none set onmousedown

UNCONFIRMED
Unassigned

Status

()

Core
Selection
UNCONFIRMED
5 years ago
4 years ago

People

(Reporter: Riskable, Unassigned)

Tracking

22 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.

Updated

5 years ago
Attachment #655482 - Attachment mime type: text/plain → text/html

Comment 1

5 years ago
(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

5 years ago
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
(Reporter)

Comment 3

5 years ago
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).
(Reporter)

Comment 4

5 years ago
I just wanted to add that I updated to Firefox 15 today (Linux) and this bug is still present.
(Reporter)

Updated

5 years ago
Version: 14 Branch → 15 Branch

Updated

5 years ago
Component: Untriaged → Selection
Product: Firefox → Core
(Reporter)

Comment 5

4 years ago
I just wanted to add that this problem still exists in Firefox 22.  Users are impacted--unable to select text without double-clicking.
Version: 15 Branch → 22 Branch

Comment 6

4 years ago
I have the exact same problem in Firefox 22 too.... Can you fix it please.
You need to log in before you can comment on or make changes to this bug.