Closed Bug 1200364 Opened 5 years ago Closed 4 years ago

AccessibleCaret moves erratically in text fields

Categories

(Core :: DOM: Selection, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed
b2g-v2.2 --- unaffected
b2g-master --- affected

People

(Reporter: ddixon, Assigned: TYLin)

References

(Blocks 1 open bug, )

Details

(Keywords: regression, Whiteboard: [2.5-Daily-Testing][Spark])

Attachments

(2 files)

Attached file caret_logcat.txt
Description:
Attempting to move the caret when focus is on the rocketbar (or other text field "To:" field), the caret moves erratically.  
The issue is more noticeable if there are at least 10 characters in the field.  
The caret jumps around and is difficult to move with accuracy. 

Repro Steps:
1) Update a Flame to 20150830190949
2) Tap on the rocketbar and enter at least 10 text characters
3) Tap on text string to acivate caret
4) Drag the caret left and right

Actual Result: 
The caret in the text field will move erratically when the user drags it left or right in a text field (i.e. rocketbar).

Expected Result:
The caret can be dragged smoothly and accurately in a text field. 

Environmental Variables:
Device: Flame 2.5
Build ID: 20150830190949
Gaia: 31e595f86f6bf159b3a9a46816a6ac00a55ca9f9
Gecko: f2518b8a7b97b5bb477e94bc9131584007aac887
Version: 43.0a1 (Master)
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0

Repro frequency:  9/10 

See attached: video (http://youtu.be/u5dUJ7hlTAk)
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Branch Check

Issue DOES occur in Aries 2.5 and Flame 2.5 builds. 

Device: Aries 2.5
BuildID: 20150831112343
Gaia: 31e595f86f6bf159b3a9a46816a6ac00a55ca9f9
Gecko: ee6d6f239fb1ce935322504e0ea8de95e381fc1b
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 43.0a1 (Master) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0

Device: Flame 2.5
Build ID: 20150830190949
Gaia: 31e595f86f6bf159b3a9a46816a6ac00a55ca9f9
Gecko: f2518b8a7b97b5bb477e94bc9131584007aac887
Version: 43.0a1 (Master)
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:43.0) Gecko/43.0 Firefox/43.0
-------------------------------------------------
-------------------------------------------------
Issue DOES NOT occur in Flame 2.2 build. 

Actual Results: 
The caret does not jump around erratically when user moves it back and forth. 

Device: Flame 2.2
BuildID: 20150826191108
Gaia: 335cd8e79c20f8d8e93a6efc9b97cc0ec17b5a46
Gecko: 16d864d163de
Version: 37.0 (2.2) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Flags: needinfo?(jmercado)
Keywords: regression
Whiteboard: [2.5-Daily-Testing][Spark]
This is a regression of functionality, lets get a window.

Gerry do you think this should be a blocker?
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Flags: needinfo?(jmercado)
Flags: needinfo?(gchang)
I don't this is a blocker. NI developer to dispatch this.
Hi Fred,
Can you help to dispatch this to right owner?
Flags: needinfo?(gchang) → needinfo?(gasolin)
QA Contact: mshuman
This issue appears to be caused by:
Bug 1172382 - Enable AccessibleCaret on B2G and fix test case failures if any

Mozilla-inbound Regression Window

Last Working 
Environmental Variables:
Device: Flame 2.5
BuildID: 20150727090146
Gaia: 4e3e21a4ba3f188b45623ee2297f21d0791f8667
Gecko: 34ade6cc41e1
Version: 42.0a1 (2.5)
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

First Broken 
Environmental Variables:
Device: Flame 2.5
BuildID: 20150727091342
Gaia: 302a448729ff2b336581cf94b66327ea836294c7
Gecko: 2ea0af589ebd
Version: 42.0a1 (2.5)
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

Last Working gaia / First Broken gecko - Issue DOES reproduce
Gaia: 4e3e21a4ba3f188b45623ee2297f21d0791f8667
Gecko: 2ea0af589ebd

First Broken gaia / Last Working gecko - 
Gaia: 302a448729ff2b336581cf94b66327ea836294c7
Gecko: 34ade6cc41e1

Gecko Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=34ade6cc41e1&tochange=2ea0af589ebd
Blocks: 1172382
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Ting-Yu this issue seems related to the changes for bug 1172382.  Can you please take a look?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmercado) → needinfo?(tlin)
Sure. I'll take this bug.
Assignee: nobody → tlin
Status: NEW → ASSIGNED
Flags: needinfo?(tlin)
Flags: needinfo?(gasolin)
Bug 1200364 - Fix AccessibleCaret jumps when dragging. r=roc

TouchCaret does not have this issue since it clamps the dragging point
to the editable content boundary.

Fix this bug by porting TouchCaret::GetContentBoundary() to
AccessibleCaret. I apply the clamp logic to both cursor mode and
selection mode if the focus node is on an editable content, which makes
carets dragging in selection mode smoother than SelectionCarets.
Attachment #8669423 - Flags: review?(roc)
Component: Gaia::Search → Selection
Product: Firefox OS → Core
Summary: [Search][Text Selection] Caret moves erratically in text fields → AccessibleCaret moves erratically in text fields
Comment on attachment 8669423 [details]
MozReview Request: Bug 1200364 - Fix AccessibleCaret jumps when dragging. r=roc

https://reviewboard.mozilla.org/r/21207/#review19101
Attachment #8669423 - Flags: review?(roc) → review+
https://reviewboard.mozilla.org/r/21207/#review19207

::: layout/base/tests/marionette/test_touchcaret.py:368
(Diff revision 1)
> +        el.tap()

The text in content is short so that el.tap() might put cursor at the end of the text. I'll add the following code after tap() to move the caret to the front.

```
sel.move_caret_to_front()
el.tap(*sel.caret_location())
```
Comment on attachment 8669423 [details]
MozReview Request: Bug 1200364 - Fix AccessibleCaret jumps when dragging. r=roc

Bug 1200364 - Fix AccessibleCaret jumps when dragging. r=roc

TouchCaret does not have this issue since it clamps the dragging point
to the editable content boundary.

Fix this bug by porting TouchCaret::GetContentBoundary() to
AccessibleCaret. I apply the clamp logic to both cursor mode and
selection mode if the focus node is on an editable content, which makes
carets dragging in selection mode smoother than SelectionCarets.
The marionette tests in this bug require bug 1212186 to work.

Try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1ddc98b5f2db
Depends on: 1212186
https://hg.mozilla.org/mozilla-central/rev/45195c2aa2e6
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.