Closed
Bug 666819
Opened 14 years ago
Closed 14 years ago
Add API to create and modify selections using mouse coords
Categories
(Core :: DOM: Selection, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 667243
People
(Reporter: mfinkle, Unassigned)
Details
On mobile, we use a different selection mechanism than on desktop. Instead of using the mouse to select parts of a page, mobile uses a handle metaphor. Long tapping on textual web content will cause the word to be selected at the tap location. Drag handles are displayed to allow the selection range to be modified.
Currently, mobile uses a bit of a hack. Mixing browser caret mode with simulated mouse events, we can create the desired behavior, but with some helpful mouse coord based APIs, it could be a lot more robust and faster.
I am suggesting adding:
nsISelectionController.selectAtPoint(x, y, what)
'what' can be "word", "line" or "paragraph"
nsIDOMNSRange.setStartPoint(x, y)
nsIDOMNSRange.setEndPoint(x, y)
these will allow the range to be extended using mouse coords, similar
to what the user can do with the mouse, but via script
| Reporter | ||
Comment 1•14 years ago
|
||
Patch is happening in bug 667243, so I am duping.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•