Closed
Bug 975276
Opened 11 years ago
Closed 11 years ago
[Keyboard]A cursor is not displayed on the head of a string by setComposition.
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.0 S5 (4july)
People
(Reporter: osk4095, Assigned: xyuan)
References
Details
Attachments
(3 files)
[steps to reproduce]
Set "0" to "cursor" of setComposition(DOMString text, optional long cursor), InputContext
InputContext.setComposition(text, 0);
* Refer to video.
[actual results]
Seemingly a cursor is displayed on the end of a string. It is not displayed on the head of it.
[expected results]
A cursor is displayed on the head of a string.
Therefore it suggests an opportunity to a user for inputting a character from the head of the string.
| Reporter | ||
Comment 1•11 years ago
|
||
Cursor_1_FxOS(bug).mp4
When "0" is set to "cursor" of "setComposition", a cursor moves to the end of a string.
Cursor_2_Android(expected).mp4
Expected result: When Android IME sets cursor location "0", a cursor locates the head of a string.
Both of above cases, you can input a letter from the head of a string.
However a blinking cursor location of "Cursor_1_FxOS(bug).mp4" is different from the expected result "Cursor_2_Android(expected).mp4".
Comment 3•11 years ago
|
||
http://mxr.mozilla.org/mozilla-central/source/dom/inputmethod/MozKeyboard.js#577
> 577 cursor: cursor || text.length,
Looks like this a simple mistake. If cursor is 0, the text.length is used unexpectedly.
We should avoid a case of |cursor === 0|.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 5•11 years ago
|
||
Thank you for your reply.
We have confirmed the expected result after fixing the place pointed out with local environment.
We are waiting for a fixed source file in the future.
| Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #4)
> Yuan, could you take a look? See comment 3.
It is a mistake. Let me fix it.
Assignee: nobody → xyuan
Flags: needinfo?(xyuan)
| Assignee | ||
Comment 7•11 years ago
|
||
It is a mistake. When cursor is not passed, we use the text length as cursor value. When cursor is passed, even 0 value, we should use the passed value, but never the text length.
Attachment #8441131 -
Flags: review?(masayuki)
Updated•11 years ago
|
Attachment #8441131 -
Flags: review?(masayuki) → review+
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Please run this through Try (and post a link here) before requesting checkin. Thanks!
Keywords: checkin-needed
| Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4][PTO June 19-22] from comment #8)
> Please run this through Try (and post a link here) before requesting
> checkin. Thanks!
The try link:
https://tbpl.mozilla.org/?tree=Try&rev=b05f4985ea0c
Comment 11•11 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S5 (4july)
You need to log in
before you can comment on or make changes to this bug.
Description
•