Closed Bug 243074 Opened 20 years ago Closed 20 years ago

Can't select more than one line in position:relative, display:inline element

Categories

(Core :: DOM: Selection, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: neilparis, Unassigned)

References

()

Details

Attachments

(1 file)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040508 Firefox/0.8.0+
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421
(Tested with both)

See http://forums.mozillazine.org/viewtopic.php?t=75003 for some more
information (also where I got the testcase from)

It seems that text that is displayed inline with position:relative set on it
does not allow proper selection. Only one line of text at a time can be selected.

I put this under Selection, but it might go better in one of the CSS components.
Attached file Testcase
This testcase was made from the mozillaZine forum post I linked above. If you
try to select the text from outside the border it works, but selecting within
the border will only work one line at a time.
I wonder why the positioning and display affect this... is this a
GetFrameForPoint issue or an issue with the ranges?
I get the described behavior in Windows XP so its not just linux.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040503
Firefox/0.8.0+ (mmoy-Pentium4a)
This behaviour has been observed to occur in both Linux(Debian) and Win98SE.
Also as pointed out in the second
page(http://forums.mozillazine.org/viewtopic.php?t=75003&start=15) of the
Mozillazine forum thread, if one tried to highlight the text from outside the
block element of code(for URL provided as test case), the highlighting goes
bezerk and you end up highlighting almost to the end of the page.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 Firefox/0.8
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040316

All show same behaviour.
OS -> ALL based on comments.
OS: Linux → All
Notes:
 -- if you start the selection from outside, it works -- all lines can be selected
 -- if you start the selection on a line, it gets trapped in that line
This is really simple. Currently selection is confined to a view. When you click
with the mouse, mouse capturing is set to the nearest view enclosing the
clicked-on frame. As you drag, that view continues to capture mouse clicks. So
dragging outside the view won't select any more text.

The real fix is in bug 53966, where I make mouse clicks only capture to the
nearest *scrolling* view. But that fix is blocked by a dependence on dbaron's
work on generating synthetic mouse events to handle updates of the mouse state
in response to layout changes.
Depends on: 53966
*** Bug 205714 has been marked as a duplicate of this bug. ***
Summary: Selecting text with position:relative that is displayed inline doesn't work → Can't select more than one line in position:relative, display:inline element
Fixed by bug 53966.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
verified fixed with trunk firefox build (20040722)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: