Open Bug 785773 Opened 8 years ago Updated 7 years ago
Element overlapping another prevents text selection despite having display:none set onmousedown
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.
(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
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
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).
I just wanted to add that I updated to Firefox 15 today (Linux) and this bug is still present.
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
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.