You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Watching mousedown/mouseup/mousemove events in the script task
Marking elements dragged over as selected
Partial selections (like a subset of a text node)
Styling selected text differently
We may want a UA-only CSS property that gets applied to any selected element, and have the inline text layout code create multiple flows for selected/non-selected text.
Is there already functionality to get from a mouse position to a BoundaryPoint (a Node and a u32 offset within the node)? If so then the Selection implementation I'm working on will have checkboxes 2 and 3 covered.
Not that I'm aware of. I think the closest thing we have is this code which is used as part of a layout query when you click on text in a text input and we figure out where to place the input cursor as a result.
I see! That looks like it would easily be extended to cover any Text node, but it doesn't cover the other sense of the offset u32, like starting a drag between two images in <span><img><img><img></span> when CSS is leaving a gap between the images.
Activity
pcwalton commentedon Dec 18, 2014
Why multiple flows? I would think only multiple fragments are needed if anything.
jdm commentedon Dec 18, 2014
My use of correct layout terminology is haphazard at best.
nhirata commentedon Feb 17, 2016
Please consider selection Test page of combo boxes made by mfinkle : http://people.mozilla.org/~nhirata/html_tp/select_test.html for whoever ends up implementing this.
SimonSapin commentedon Mar 4, 2016
@nhirata That test page is about the
<select>element, right? This issue is about text selection with click + drag:Or do the two interact?
pshaughn commentedon Feb 2, 2020
Is there already functionality to get from a mouse position to a BoundaryPoint (a Node and a u32 offset within the node)? If so then the Selection implementation I'm working on will have checkboxes 2 and 3 covered.
jdm commentedon Feb 10, 2020
Not that I'm aware of. I think the closest thing we have is this code which is used as part of a layout query when you click on text in a text input and we figure out where to place the input cursor as a result.
pshaughn commentedon Feb 10, 2020
I see! That looks like it would easily be extended to cover any Text node, but it doesn't cover the other sense of the offset u32, like starting a drag between two images in
<span><img><img><img></span>when CSS is leaving a gap between the images.[-]Support selecting DOM elements via the mouse[/-][+]Support selecting DOM text via the mouse[/+]script: Add initial support for updating Document selection with the …
script: Add initial support for updating Document selection with the …
script: Add initial support for updating Document selection with the …