Closed
Bug 889347
Opened 11 years ago
Closed 11 years ago
mozKeyboard.selectionEnd is not properly set when using setSelectionRange
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sergi, Assigned: janjongboom)
References
Details
Attachments
(3 files)
54 bytes,
text/plain
|
Details | |
467 bytes,
patch
|
xyuan
:
review+
|
Details | Diff | Splinter Review |
46 bytes,
patch
|
xyuan
:
review+
|
Details | Diff | Splinter Review |
When setting the cursor using `navigator.mozKeyboard.setSelectionRange` and then retrieving the current position using `navigator.mozKeyboard.selectionEnd`, the latter gives the wrong cursor position and updates erratically. I created a Gaia branch with a test case in the UITests app. You can find the branch at https://github.com/comoyo/gaia/tree/test_selection_end. If you keep clicking in the input field, the cursor will move randomly using `setSelectionRange` but `selectionEnd` doesn't really update properly.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → janjongboom
Assignee | ||
Comment 1•11 years ago
|
||
setSelectionRange doesn't synchronous update selectionEnd, but there is an event exposed (onselectionchange) that should fire whenever the selection changes. At the moment this is broken in B2G because the event doesn't bubble up from forms.js where the event originates. I'll append a patch for mozilla-central to this issue.
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #770714 -
Flags: review?(rlu)
Assignee | ||
Updated•11 years ago
|
Attachment #770716 -
Flags: review?(rlu)
Comment 4•11 years ago
|
||
Hi Jan, For MozKeyboard related changes, (even it is a one-line patch), I don't feel I am qualified to review since most of the time, I worked on Gaia part. Could you please ask Fabrice or :yxl to review this? Thank you.
Flags: needinfo?(xyuan)
Comment 5•11 years ago
|
||
Comment on attachment 770714 [details] [diff] [review] Gecko Patch Review of attachment 770714 [details] [diff] [review]: ----------------------------------------------------------------- Simple and straightforward. r=+
Attachment #770714 -
Flags: review?(rlu) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Flags: needinfo?(xyuan)
Comment 6•11 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/7945c16d34e3 To make life easier for those checking in on your behalf, please make sure that future patches are generated following the guidelines below. Note that your commit message should be a description of what the patch is actually doing. https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Keywords: checkin-needed
Comment 7•11 years ago
|
||
Comment on attachment 770716 [details] [diff] [review] Gaia patch (for desktop-helper) r=me with nits addressed. Please see the comments in the attachment pull request.
Attachment #770716 -
Flags: review?(rlu) → review+
Comment 8•11 years ago
|
||
Jan & Ryan, thanks for your help.
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7945c16d34e3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•11 years ago
|
||
Hi Ryan, Sorry, I hardly ever land platform stuff. Will take note.
Assignee | ||
Comment 11•11 years ago
|
||
Landed in https://github.com/mozilla-b2g/gaia/commit/ad19aaaf191498602eaecda409ca9de6537be357
You need to log in
before you can comment on or make changes to this bug.
Description
•