Closed Bug 714131 Opened 13 years ago Closed 12 years ago

[ICS] Implement the new clipboard bar in the actionbar

Categories

(Firefox for Android Graveyard :: General, defect, P2)

12 Branch
ARM
Android
defect

Tracking

(firefox11 affected, firefox12 affected, firefox15 verified, blocking-fennec1.0 beta+, fennec11+)

VERIFIED FIXED
Firefox 13
Tracking Status
firefox11 --- affected
firefox12 --- affected
firefox15 --- verified
blocking-fennec1.0 --- beta+
fennec 11+ ---

People

(Reporter: mfinkle, Assigned: sriram)

References

Details

(Keywords: regression, reproducible, uiwanted)

Attachments

(1 file, 1 obsolete file)

Steps:
1. Load a website
2. Tap on URLbar to open the awesomescreen
3. long tap on the selected text (the current URL should be selected)

The menu that is displayed acts like no text is selected in the textbox. If you pick "Select All", then long tap again and you'll see "Cut" and "Copy" on the menu.
Priority: -- → P3
I don't get a context menu at all in current nightly build, I'm only getting the selection tool.
(In reply to Martijn Wargers [:mw22] (QA - IRC nick: mw22) from comment #1)
> I don't get a context menu at all in current nightly build, I'm only getting
> the selection tool.

Ditto. Mozilla/5.0 (Android; Linux armv7l; rv:12.0a1) Gecko/20111230 Firefox/12.0a1 Fennec/12.0a1
Keywords: regression
OS: Linux → Android
Hardware: x86 → ARM
Basic feature which is annoying to not have. Recommended P2.
Summary: Context menu in Awesomebar does not act like text is selected → Unable to invoke context menu for any text in the URL Bar
Whiteboard: [QA^]
tracking-fennec: --- → 11+
Version: unspecified → Firefox 12
Work around is to switch to landscape keyboard. Also can't select input method without a context menu.
Apparently this is broken on ICS.

This works on a recent inbound build on Gingerbread on my Galaxy SII.
Keywords: reproducible
Whiteboard: [QA^] → [QA^][has-regression-range]
Also recommending at least P2 - not being able to copy/paste links from other apps/the stock browser into fennec can be quite limiting.
Summary: Unable to invoke context menu for any text in the URL Bar → [ICS] Unable to invoke context menu for any text in the URL Bar
In ICS, we might need to add an ActionMode to perform this. Currently we are overriding the ActionBar with our custom ActionBar.
On my further investigation, the edit-text boxes in "ActionBar" have "android:textIsSelectable" to be false. http://developer.android.com/reference/android/widget/TextView.html#attr_android:textIsSelectable [I verified this from logs].

Hence, a new ActionMode would not appear by default. (This happens if the edit-text was available inside the content).

I checked apps like People (Contacts app in ICS). The Search box on the ActionBar doesn't allow text selection and pasting.

Since ICS doesn't have the ability to have "context menu" on "long press", this feature cannot be triggered by any means.

Only way to have the cut, copy, paste is for us to manually have an ActionMode and use it.

The stock browser does this differently. To my knowledge, they have their own custom ActionBar. On long press, the contents of the ActionBar is "overlaid" on top of actual screen and shown, and the actual ActionBar moves into an ActionMode showing the icons. Things to note here:
1. The ActionMode for Stock browser (note the "Share" icon to share the URL) uses a custom one. The background color is different as well.
2. The URL bar is either in ActionBar or as part of main layout -- which I couldn't confirm properly. The menu button is confusing me. But Android IRC channel confirmed that they use a custom menu button.

If we want edit options, we need to do an ActionMode for our own use.
Whiteboard: [QA^][has-regression-range]
Keywords: uiwanted
Summary: [ICS] Unable to invoke context menu for any text in the URL Bar → [ICS] Implement the new clipboard bar in the actionbar
If we show an ActionMode for these actions, we need to move the ActionBar (currently showing AwesomeBar) to main layout. Is this the desired approach?
(In reply to Sriram Ramasubramanian [:sriram] from comment #11)
> If we show an ActionMode for these actions, we need to move the ActionBar
> (currently showing AwesomeBar) to main layout. Is this the desired approach?

Performance hit?
Assignee: nobody → sriram
Priority: P3 → P2
blocking-fennec1.0: --- → beta+
Status: NEW → ASSIGNED
Playing with ActionMode for some time, I found this.
On starting ActionMode on long-press, we need to move the contents of the ActionBar to a temporary View on top of the tabs. The new ActionMode pops up now. However, the text in the EditText (the awesomebar-search) is not selectable! Also, the ActionMode exists from there when I press on the EditText or even when I take my finger from the old EditText.
I am unable to fix this part.

The other option is to show a "context-menu" with the options. Even then, the select wouldn't be selectable as long as EditText is in ActionBar. This is a known issue in all EditTexts in ICS. e.g. People app.
Can we play with putting the tabs on top (in the ActionBar) here, and hiding them (the tabs) if the user focuses/starts editing the textbox? That seems more IceCreamSandwichy to me anyway.
Attached patch Patch (obsolete) — Splinter Review
This patch brings back the default ActionMode.
The ActionBar for AwesomeBar is now removed. This patch adds a small little menu button in Galaxy Nexus.

Also, this doesn't address the landscape mode of AwesomeBar -- which wouldn't be needed as the keyboard comes up in landscape mode.
Attachment #605008 - Flags: review?(mark.finkle)
(In reply to Sriram Ramasubramanian [:sriram] from comment #15)
> Created attachment 605008 [details] [diff] [review]
> Patch
> 
> This patch brings back the default ActionMode.
> The ActionBar for AwesomeBar is now removed. This patch adds a small little
> menu button in Galaxy Nexus.

We need a way to remove this menu button. How does Chrome and Stock do it?

> Also, this doesn't address the landscape mode of AwesomeBar -- which
> wouldn't be needed as the keyboard comes up in landscape mode.

We are actually working to not use the landscape keyboard. This might not be an issue for long. What impact does it have currently?
The impact in landscape mode is not big. Instead of 42dip height, we will be showing 48dip for AwesomeBar.
Attached patch PatchSplinter Review
This patch avoids the menu button and hides the action-bar in XML (just like TabsTray) -- hence no performance regression. When we long press on the awesomebar-search, the default action-mode kicks in.
Attachment #605008 - Attachment is obsolete: true
Attachment #605008 - Flags: review?(mark.finkle)
Attachment #605024 - Flags: review?(mark.finkle)
Attachment #605024 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/f5b002584ce3
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Depends on: 735209
Verified fixed on:

Firefox 15.0a1 (2012-05-21)
Device: Galaxy Nexus
OS: Android 4.0.2
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: