Closed
Bug 801421
Opened 13 years ago
Closed 11 years ago
Selection's end point is not updated after the range is changed
Categories
(Firefox for Android Graveyard :: Text Selection, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: zer0, Unassigned)
References
Details
Attachments
(2 files)
I'm working on makes our selection's module in Add-on SDK (jetpack) working on Fennec.
I found that when we replace the current selection's text, the end point of the selection is not updated on Fennec, even if text is selected properly.
See the screenshot for more information, and the simple HTML page attached to reproduce the behavior.
Tested on Samsung Galaxy Tab.
| Reporter | ||
Comment 1•13 years ago
|
||
The end point of selection in the screenshot, is still pointing to the previous selection area.
Comment 2•13 years ago
|
||
Which build are you using?
Component: General → Text Selection
OS: Mac OS X → Android
Product: Fennec → Firefox for Android
Hardware: x86 → ARM
Version: Trunk → unspecified
| Reporter | ||
Comment 3•13 years ago
|
||
Firefox release (16.0) and Nightly (19.0.1), but this one is not the latest one, because the latest one constantly crashes.
| Reporter | ||
Comment 4•13 years ago
|
||
I wipe out the profile and tested with the latest Nightly, the issue is still there.
Comment 5•13 years ago
|
||
It looks like we need to add some code to update the handle positions if the selection changes. We're already listening for selection changes to check to see if the selection is collapsed, so we can stick logic to fix this issue in there:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#1727
I think a call to updateCacheForSelection() and positionHandles() in there should do the job. However, we need to check to see if notifySelectionChanged() is called when we change the selection ourselves in moveSelection, because the Java side of things we already be handling repositioning the handles.
I'm marking this a mentor bug, but I don't know that it would make a good first bug, because this could be tricky.
Whiteboard: [mentor=margaret][lang=js]
Comment 6•12 years ago
|
||
This code has changed with bug 667243, so my last comment is no longer valid.
This could probably be fixed as part of bug 864589.
Depends on: 864589
Whiteboard: [mentor=margaret][lang=js]
Updated•12 years ago
|
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Comment 7•12 years ago
|
||
Hmmmm ... range level changes (range.deleteContents(); range.insertNode(node); range.selectNode(node);) don't trigger parent level selectionListener notifications that we can intercept and act on.
Modifying the example code like: http://jsfiddle.net/nxAtn/2/ produces a cleaner result as a workaround ...
Comment 8•12 years ago
|
||
meh ... my mistake, that removes the selection entirely, in addition to the handles
Updated•12 years ago
|
Assignee: markcapella → nobody
Updated•12 years ago
|
Status: ASSIGNED → NEW
Comment 9•11 years ago
|
||
I've had this bug in mind as possibly being solved using work that bug 1060579 may provide (enhanced selectionListeners)
However, on re-testing the original issue to verify, it appears to me that our work on Bug 895463 has already fixed it!
If I can have Q/A verify it, I think we can close this.
Comment 10•11 years ago
|
||
meh ... should've just ni'd in the first place
Flags: needinfo?(aaron.train)
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(aaron.train)
Resolution: --- → WORKSFORME
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•