Closed
Bug 1241558
Opened 9 years ago
Closed 9 years ago
backspace deletes text not where the cursor is
Categories
(Firefox for Android Graveyard :: Keyboards and IME, defect)
Tracking
(firefox45 verified, firefox46 fixed, firefox47 verified, fennec45+)
VERIFIED
FIXED
Firefox 47
People
(Reporter: blassey, Assigned: jchen)
References
()
Details
(Keywords: regression)
Attachments
(5 files, 4 obsolete files)
|
2.75 KB,
patch
|
Details | Diff | Splinter Review | |
|
15.48 KB,
patch
|
esawin
:
review+
capella
:
feedback+
lizzard
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
|
3.47 KB,
patch
|
esawin
:
review+
|
Details | Diff | Splinter Review |
|
1.32 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
|
15.54 KB,
patch
|
jchen
:
review+
|
Details | Diff | Splinter Review |
STR:
1) On nightly, click the "Report Site Issue" menu item (which will open webcompat.com)
2) In the "give more details" text box, touch next to the "2)" and type some text
3) touch at the bottom of the text field (after "Actual Behavor:") to place cursor there
4) hit backspace
ER: "Actual Behavior" text should be deleted
AR: The text you typed in step 2 gets deleted
Comment 1•9 years ago
|
||
dup of bug 1235632 ?
Mark can you see if this is related to the text selection handles?
tracking-fennec: ? → 47+
Flags: needinfo?(markcapella)
Comment 3•9 years ago
|
||
snorp: sure.
I came in here with bug 1235632, which was (most likely mis-)labelled a Text Selection component, and is most likely a dup here.
I believe this will wind up properly being an IME-keyboard component / issue. The selection handles (afaik) only reflect selection state, vs text content state.
I started poking earlier down a fruitless train of thought centered on clearing the composition event state at point of single-tap re-positioning of the cursor, and haven't looped back yet.
I'll cc: jchen to be sure it's on his radar, though I've been assuming he monitors this component.
Comment 5•9 years ago
|
||
This seems to correct this bug, as well as bug 1235632.
(see https://bugzilla.mozilla.org/show_bug.cgi?id=1235632#c2 for more description).
The common issue here is |single:tap (step 3: touch at the bottom)| conflict with ongoing compositions.
Initially I'd tried issuing a REQUEST_TO_COMMIT_COMPOSITION event at the appropriate place, a solution we employed in Bug 1082425, but that has no effect in this case.
The (personally abhorred) fallback blur/focus solution works fine.
request review from kats for code location, from jchen for correctness / alternative thoughts.
Attachment #8710985 -
Flags: review?(nchen)
Attachment #8710985 -
Flags: review?(bugmail.mozilla)
Comment 6•9 years ago
|
||
Comment on attachment 8710985 [details] [diff] [review]
bug1241558.diff
Review of attachment 8710985 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/android/AndroidContentController.cpp
@@ +63,5 @@
> +
> + // Commit the composition string of the old editable focus element
> + // (if there is any) before tapping (via mouse events) changes the focus.
> + // Note: REQUEST_TO_COMMIT_COMPOSITION alternative is not useful here.
> + nsIDOMWindow* win = shell->GetDocument()->GetWindow();
This should go outside the (shell && shell->ScaleToResolution()) condition. You probably want a new condition with just if (shell) {...}
Attachment #8710985 -
Flags: review?(bugmail.mozilla)
Comment 7•9 years ago
|
||
Comment on attachment 8710985 [details] [diff] [review]
bug1241558.diff
Cancelling r? pending kats' tweak ... & digging a little deeper
Attachment #8710985 -
Flags: review?(nchen)
Comment 9•9 years ago
|
||
workaround: For Google and stock Android (AOSP) keyboards, under "Text correction", disable "Show correction suggestions".
Comment 10•9 years ago
|
||
Actually, using [0] as the testcase, Google Keyboard with "Show correction suggestions", and reduced STR:
) tap into text field
) observe composition underline / styling
) tap backspace
) observe char delete and styling removal
We see baseline Chrome behaviour [1] matches correct behaviour in release-v44 [2]. Regression behaviour starts in beta-v45 [3] with incorrect caret positioning after backspace, and seemingly gets worse in nightly-v47 [4].
Still digging, but my ugly-hack seems to fix the bit that regresses between v45-v47 (gets us back to beta), but not the basic problem that occurred from v44-v45. :-/
[0] https://www.dropbox.com/s/mzzgw1i4uav925y/test_bug1241558_backspace.html?dl=0
[1] https://www.dropbox.com/s/oku5c1cay2pnvmp/bug1241558_backSpace_CHROME.mp4?dl=0
[2] https://www.dropbox.com/s/vwfjh21xxgpyifq/bug1241558_backSpace_v44.mp4?dl=0
[3] https://www.dropbox.com/s/inhws4f0b2t13pw/bug1241558_backSpace_v45.mp4?dl=0
[4] https://www.dropbox.com/s/k2i03f6mil6hzvy/bug1241558_backSpace_v47.mp4?dl=0
Attachment #8710985 -
Attachment is obsolete: true
Comment 11•9 years ago
|
||
regression (local builds before/after) points here:
https://hg.mozilla.org/mozilla-central/rev/8ed62b03205f
https://hg.mozilla.org/releases/mozilla-aurora/rev/3a919bac5d72
Updated•9 years ago
|
Flags: needinfo?(nchen)
Updated•9 years ago
|
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Flags: needinfo?(nchen)
| Assignee | ||
Updated•9 years ago
|
Blocks: 1236705
Keywords: regression
| Assignee | ||
Comment 12•9 years ago
|
||
When Java is changing the composition, we should ignore the Gecko
selection. However, when Gecko is committing its composition, we should
not be ignoring the corresponding Gecko selection change. In other
words, we should only ignore selection changes when we know the change
is from Java.
Attachment #8715525 -
Flags: review?(esawin)
| Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8715526 -
Flags: review?(esawin)
Comment 14•9 years ago
|
||
drive by: I've applied and tested the patch in comment #12 and don't see corrected behaviour that I expected. Is that the right patch, or have I mis-understood something?
Flags: needinfo?(nchen)
| Assignee | ||
Comment 15•9 years ago
|
||
It corrects a subset of the problem (the case added to the testcase), but I see there are other cases to consider.
Flags: needinfo?(nchen)
Comment 16•9 years ago
|
||
Comment on attachment 8715525 [details] [diff] [review]
Don't ignore Gecko selection when Gecko commits composition (v1)
Review of attachment 8715525 [details] [diff] [review]:
-----------------------------------------------------------------
Also, moar tweaks like AutoIMESynchronize and TYPE_UPDATE_COMPOSITION ftw \o/
::: mobile/android/base/java/org/mozilla/gecko/GeckoEditable.java
@@ +1097,5 @@
> }
>
> // Ignore the next selection change because the selection change is a
> // side-effect of the replace-text event we sent.
> mIgnoreSelectionChange = true;
Right, your provisional ignore of "next-selection" as provided doesn't address where the text length changes on backspace. Ok, thought I was losing it :-)
| Assignee | ||
Comment 17•9 years ago
|
||
This should make backspacing better. :capella, can you try it out?
Attachment #8717081 -
Flags: review?(esawin)
Attachment #8717081 -
Flags: feedback?(markcapella)
| Assignee | ||
Updated•9 years ago
|
Attachment #8715525 -
Attachment is obsolete: true
Attachment #8715525 -
Flags: review?(esawin)
| Assignee | ||
Comment 18•9 years ago
|
||
Updated test with an additional test case.
Attachment #8717082 -
Flags: review?(esawin)
| Assignee | ||
Updated•9 years ago
|
Attachment #8715526 -
Attachment is obsolete: true
Attachment #8715526 -
Flags: review?(esawin)
| Assignee | ||
Comment 19•9 years ago
|
||
Geoff, do you remember why testInputConnection was disabled on 4.3? It's not
bug 1025968 because AFAICT that's only for 2.3. The test doesn't get run at all
when we disable it for both 2.3 and 4.3, and I'd rather have it running on 4.3.
I did some try runs and it seems to be pretty reliable.
Attachment #8717125 -
Flags: review?(gbrown)
Comment 20•9 years ago
|
||
Comment on attachment 8717125 [details] [diff] [review]
Re-enable testInputConnection on 4.3 (v1)
Review of attachment 8717125 [details] [diff] [review]:
-----------------------------------------------------------------
I don't recall and did not update the comment properly - sorry.
As long as it's working now...
Attachment #8717125 -
Flags: review?(gbrown) → review+
Comment 21•9 years ago
|
||
Comment on attachment 8717081 [details] [diff] [review]
Don't ignore Gecko selection when Gecko commits composition (v2)
Review of attachment 8717081 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! I pecked around with Google and SwiftKey kbds, autoCorrect on/off, autoInsertPredication, tapping various places, backspacing, typing, etc. Everything looks great!
Attachment #8717081 -
Flags: feedback?(markcapella) → feedback+
Comment 22•9 years ago
|
||
Comment on attachment 8717081 [details] [diff] [review]
Don't ignore Gecko selection when Gecko commits composition (v2)
Review of attachment 8717081 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/java/org/mozilla/gecko/GeckoEditable.java
@@ +1116,5 @@
> + // Nothing to do because the text is the same. This could happen when
> + // the composition is updated for example, in which case we want to keep the
> + // Java selection.
> + mIgnoreSelectionChange |= (action != null &&
> + action.mType == Action.TYPE_UPDATE_COMPOSITION);
Although, this is correct, it's misleading (using bitwise OR instead of logical OR), can you write it out instead?
::: widget/android/nsWindow.cpp
@@ +355,5 @@
> + public:
> + AutoIMESynchronize(GeckoViewSupport* gvs) : mGVS(gvs) {}
> + ~AutoIMESynchronize() { mGVS->OnImeSynchronize(); }
> + };
> +
This is nice. Can you add a comment describing why we need it?
Attachment #8717081 -
Flags: review?(esawin) → review+
Updated•9 years ago
|
Attachment #8717082 -
Flags: review?(esawin) → review+
Comment 23•9 years ago
|
||
Comment 24•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5ff7ebae71b2
https://hg.mozilla.org/mozilla-central/rev/1456f80ef613
https://hg.mozilla.org/mozilla-central/rev/f2dfb3c8fd45
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Comment 25•9 years ago
|
||
jchen, looks like we're on-track to ship this regression in 45 and 46. Is the fix suitable for uplifting?
Or if not, should we back out the regressing bug 1236705 (identified in comment 11 here)?
This bug makes text-editing unpredictable & really annoying... and backspacing to fix typos is a common use-case on mobile I expect. (it is for me at least). So, it'd be great if we could avoid shipping this regression in a release...
Flags: needinfo?(nchen)
| Assignee | ||
Comment 26•9 years ago
|
||
I guess I had assumed this only affected builds with APZ and/or accessible carets enabled (i.e. nightly builds). We can uplift.
Flags: needinfo?(nchen)
| Assignee | ||
Comment 27•9 years ago
|
||
Approval Request Comment
[Feature/regressing bug #]: Bug 1236705
[User impact if declined]: Bad experience when inputting text
[Describe test coverage new/current, TreeHerder]: Locally, m-c
[Risks and why]: Some risk. Patch introduces new code but the code is tested.
[String/UUID change made/needed]: None
Attachment #8724149 -
Flags: review+
Attachment #8724149 -
Flags: approval-mozilla-beta?
| Assignee | ||
Comment 28•9 years ago
|
||
Comment on attachment 8717081 [details] [diff] [review]
Don't ignore Gecko selection when Gecko commits composition (v2)
Aurora request for this patch only.
Approval Request Comment
[Feature/regressing bug #]: Bug 1236705
[User impact if declined]: Bad experience when inputting text
[Describe test coverage new/current, TreeHerder]: Locally, m-c
[Risks and why]: Some risk. Patch introduces new code but the code is tested.
[String/UUID change made/needed]: None
Attachment #8717081 -
Flags: approval-mozilla-aurora?
Comment 29•9 years ago
|
||
Comment on attachment 8724149 [details] [diff] [review]
Patch for Beta
Sorry but this is too late for 45.
Attachment #8724149 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
Updated•9 years ago
|
Comment 30•9 years ago
|
||
This bug is sufficiently-annoying from a usability perspective that I'm worried it might push users away. Any way we could reconsider (or take it in a Fennec dot release)? With our new concept of empowering ourselves to press a button to stop or delay a release, I think this bug is a case where we should strongly consider doing that.
This manifests pretty much any time someone tries to edit text that they've just typed into a web form (e.g. a search engine's textfield, or a username/password field, or a comment box). If they make the fatal mistake of pressing the backspace key, their text-entry field becomes unpredictable & unusable from that point on.
Updated•9 years ago
|
Flags: needinfo?(sledru)
Comment 31•9 years ago
|
||
(jchen: if we get beta backport approval, are you comfortable with this bug's patch going pretty much directly to release users with very little time for testing/additional-fixes, given that current-beta is shipping as release next week?)
Flags: needinfo?(nchen)
Comment 32•9 years ago
|
||
Here's a screencast of this bug in action, as a demonstration of how easy it is to hit & how annoying it is.
Comment 35•9 years ago
|
||
(Another screencast, showing that the same bug affects <textarea>:
https://www.youtube.com/watch?v=-KS3L9G3rYU
Both this screencast & the earlier one are taken with Firefox Beta on Android.)
Comment 36•9 years ago
|
||
Comment on attachment 8724149 [details] [diff] [review]
Patch for Beta
After discussing with a bunch of people, clearly, we need it for fennec beta 11
Flags: needinfo?(sledru)
Attachment #8724149 -
Flags: approval-mozilla-beta- → approval-mozilla-beta+
| Assignee | ||
Comment 38•9 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #31)
> (jchen: if we get beta backport approval, are you comfortable with this
> bug's patch going pretty much directly to release users with very little
> time for testing/additional-fixes, given that current-beta is shipping as
> release next week?)
I would say so based on the couple weeks it spent on m-c.
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(nchen)
This caused failures on beta and release: https://treeherder.mozilla.org/logviewer.html#?job_id=858366&repo=mozilla-beta
I'm going to back it out for now on both so the RC candidate can get built.
https://hg.mozilla.org/releases/mozilla-beta/rev/29a9c826963a
https://hg.mozilla.org/releases/mozilla-release/rev/d57d26c516f1
Flags: needinfo?(nchen)
| Assignee | ||
Comment 40•9 years ago
|
||
Sorry, here's an updated patch that builds.
Attachment #8724149 -
Attachment is obsolete: true
Flags: needinfo?(nchen)
Attachment #8725101 -
Flags: review+
Comment 41•9 years ago
|
||
Comment 42•9 years ago
|
||
Verified as fixed on Firefox 45 Beta 11 and on latest Nightly
Comment 43•9 years ago
|
||
Verified as fixed on Firefox 45 RC
Updated•9 years ago
|
tracking-fennec: 47+ → 45+
Comment 44•9 years ago
|
||
Comment on attachment 8717081 [details] [diff] [review]
Don't ignore Gecko selection when Gecko commits composition (v2)
Approved for aurora uplift. But is this already on 46?
Attachment #8717081 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 45•9 years ago
|
||
| bugherder uplift | ||
Updated•9 years ago
|
Version: unspecified → 45 Branch
Updated•4 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
•