Unable to invoke the text-interaction bar (ActionMode) on a URL in Android 4.1

VERIFIED FIXED in Firefox 15

Status

()

Firefox for Android
General
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: aaronmt, Assigned: sriram)

Tracking

({regression, relnote})

Trunk
Firefox 17
ARM
Android
regression, relnote
Points:
---

Firefox Tracking Flags

(firefox14 affected, firefox15+ verified, firefox16+ verified, firefox17 verified, firefox18 verified, fennec15+)

Details

(Whiteboard: [jellybean][parity-stock][parity-chrome])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Long-tap and hold on the current URL. 

ER: ICS/Jellybean text-interaction bar - (context-menu, 2.2/2.3)
AR: Nothing

Bring back the text-interaction bar.

--
Samsung Galaxy Nexus (Android 4.1)
Nightly (07/04)
(Reporter)

Comment 1

5 years ago
My mistake, looks like we have a 4.1 issue here.
Keywords: regression, regressionwindow-wanted
Summary: Unable to invoke the Android ICS/Jellybean text-interaction bar → Unable to invoke the text-interaction bar on a URL in Android 4.1
Whiteboard: [jellybean]
(Reporter)

Updated

5 years ago
status-firefox14: --- → affected
status-firefox15: --- → affected
(Reporter)

Updated

5 years ago
Summary: Unable to invoke the text-interaction bar on a URL in Android 4.1 → Unable to invoke the text-interaction bar (ActionMode) on a URL in Android 4.1
(Reporter)

Comment 2

5 years ago
Sriram, do we need startActionMode?
(Reporter)

Comment 3

5 years ago
This will be a pain-point for a functional loss and negative review for JB users.
Keywords: regression
(Reporter)

Updated

5 years ago
status-firefox17: --- → affected
(Assignee)

Comment 4

5 years ago
Actual STR:
1. Tap on the URL bar
2. Long tap on the "editable" url.
(Assignee)

Comment 5

5 years ago
We currently don't use ActionBar in AwesomeBar. It's hidden in AwesomeBar.
In ICS:
  When we long press, android brings up the text-interaction bar -- even when we make the ActionBar visibility to be "gone".

In JB:
  When we long press, android doesn't bring up the text-interaction bar -- as the visibility of the ActionBar is "gone".

Now, we can override the long press on the editable text to show the action-bar.
But, we won't know when the user is done with the options android gives, as we don't own the ActionMode.Callback to monitor the change of ActionBar. So, we cannot close it.
tracking-fennec: ? → 16+
tracking for 15 just because we'll want to make an explicit call about uplifting when we have a patch to evaluate
tracking-fennec: 16+ → 15+
(Reporter)

Comment 7

5 years ago
Nexus S users just got 4.1.1 [1], just got it on my phone. Confirming same issue on my Nexus S.

[1] http://www.androidcentral.com/android-411-jelly-bean-ota-now-appearing-some-nexus-s-variations
(Reporter)

Updated

5 years ago
Whiteboard: [jellybean] → [jellybean][parity-stock][parity-chrome]
(Assignee)

Updated

5 years ago
Duplicate of this bug: 760160
Carrying forward tracking from bug 760160 so we can keep this on our radar.
tracking-firefox15: --- → +
tracking-firefox16: --- → +
(Assignee)

Comment 10

5 years ago
Created attachment 646375 [details] [diff] [review]
Patch

This patch finally fixes it.
Basic problems:
 JB is strict with ActionBar! If we specify the visibility as "gone", it won't show text interaction.
 We don't own the ActionMode when it is shown, and hence we cannot hide it when text-editing is done.

Solution:
 On long press, show the action-bar. Android takes care of the action-mode there.
 When we know the text has changed -- possibly by cut/paste,
 or when the selection has changed -- by dismissing the selected text -- possibly by copy/done/tapping on EditText
 hide the actionbar.
Attachment #646375 - Flags: review?(mbrubeck)
(Assignee)

Comment 11

5 years ago
Created attachment 646386 [details] [diff] [review]
Patch

This fixes one other bug.
Attachment #646375 - Attachment is obsolete: true
Attachment #646375 - Flags: review?(mbrubeck)
Attachment #646386 - Flags: review?(mbrubeck)
Comment on attachment 646375 [details] [diff] [review]
Patch

Review of attachment 646375 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/AwesomeBar.java
@@ +217,5 @@
> +            @Override
> +            public boolean onLongClick(View v) {
> +                if (Build.VERSION.SDK_INT >= 11 && ((CustomEditText) v).getText().length() > 0) {
> +                    getActionBar().show();
> +                    return false;

Should we "return true" here?

::: mobile/android/base/CustomEditText.java
@@ +26,5 @@
>      public void setOnKeyPreImeListener(OnKeyPreImeListener listener) {
>          mOnKeyPreImeListener = listener;
>      }
>  
> +    OnSelectionChangedListener mOnSelectionChangedListener;

Minor nit: Please move all the new code below the onKeyPreIme() method (so all the onKeyPreImeListener code remains together).
Attachment #646375 - Attachment is obsolete: false
Attachment #646375 - Attachment is obsolete: true
Attachment #646386 - Flags: review?(mbrubeck) → review+
(Reporter)

Comment 13

5 years ago
QA Note:

Look for no functional loss on all other supported Android versions.
(Assignee)

Comment 14

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/d45e4a0ec5aa

There are 11+ checks everywhere. So it won't affect.
https://hg.mozilla.org/mozilla-central/rev/d45e4a0ec5aa
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17

Updated

5 years ago
Depends on: 778438

Updated

5 years ago
status-firefox17: affected → ---
(Reporter)

Comment 16

5 years ago
This broke Honeycomb in bug 778438.
please nominate for uplift if this is low-risk enough to consider. i've also tracked bug 778438 so we can ensure we take the honeycomb breakage fix at the same time.
(Reporter)

Comment 18

5 years ago
Uplift! Go-go-go
Status: RESOLVED → VERIFIED
status-firefox17: --- → verified
(Assignee)

Comment 19

5 years ago
Comment on attachment 646386 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): -
User impact if declined: Users cannot cut-copy-paste on awesomescreen.
Testing completed (on m-c, etc.): Landed in m-c on 07/27
Risk to taking this patch (and alternatives if risky): Bug 760160.
String or UUID changes made by this patch: None.
Attachment #646386 - Flags: approval-mozilla-beta?
Attachment #646386 - Flags: approval-mozilla-aurora?
Comment on attachment 646386 [details] [diff] [review]
Patch

Not sure why the possible fallout from this bug is linking to a bug that is resolved as duplicate of _this_ bug, but I assume that means any fallout from this patch will be tracking in this bug.
Attachment #646386 - Flags: approval-mozilla-beta?
Attachment #646386 - Flags: approval-mozilla-beta+
Attachment #646386 - Flags: approval-mozilla-aurora?
Attachment #646386 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 21

5 years ago
Pushed to aurora:
https://hg.mozilla.org/releases/mozilla-aurora/rev/35eecb9cc1aa
(Reporter)

Updated

5 years ago
status-firefox16: affected → fixed
(Assignee)

Comment 22

5 years ago
Pushed to beta:
https://hg.mozilla.org/releases/mozilla-beta/rev/5b96d31cd936
(Reporter)

Updated

5 years ago
status-firefox15: affected → fixed
Keywords: relnote
Indeed, it's fixed on all branches.

--
Device: Galaxy Note
OS: Android 4.1.1
status-firefox15: fixed → verified
status-firefox16: fixed → verified
status-firefox18: --- → verified
I need 3 long taps before I finally get the text-interaction bar to appear for the url bar. That seems very excessive, so I filed bug 797565 for it.
You need to log in before you can comment on or make changes to this bug.