Closed Bug 889555 Opened 11 years ago Closed 11 years ago

Address bar context menu appear after second long tap

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

25 Branch
ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 25

People

(Reporter: mkajda, Assigned: mkajda)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130620123127

Steps to reproduce:

1. Enter some url into address bar and go to a web page.
2. Tap address bar once to select address
3. Long tap selected text
  - full context menu should appear at this point
  - only 'Paste' appear
4. Tap address again to deselect text
5. Long tap text again
  - now full context menu should appear


Actual results:

Full context menu (including 'Select all', 'Cut' 'Copy', 'Paste') appear for the second time. 


Expected results:

Full context menu should be displayed after first long tap.
OS: Linux → Android
Hardware: x86_64 → ARM
Android version 4.2.2
Model: Nexus 4

Reproducible on stable 22.0 and 25 built from repo.
I can look into this issue with your help.
If you have any suggestions, please let me know.
On Chrome and stock browser, the context menu appears on first long tap. I've installed some older builds and the context menu appears only after the second tap( for example Firefox for Android 15)
Please find a regression-range.
tracking-fennec: --- → ?
Flags: needinfo?(teodora.vermesan)
If on Firefox for Android 15 the same behaviour happens, shall I go deeper and install older builds and find the regression-range?
Flags: needinfo?(teodora.vermesan)
No. It would seem then that this has been around for some time then.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Could anyone assign bug to me please?
Thanks.
Assignee: nobody → michal.kajda
I added some logs in onLongClick callback locally and it turned out that action bar's isShowing() method was returning true, when activity was created.
That's why it was not possible to draw the action bar until hide method was called for the first time from onSelectionChanged(int selStart, int selEnd) or afterTextChanged(final Editable s) callback.
https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/base/AwesomeBar.java#l251
https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/base/AwesomeBar.java#l742

After that, state of action bar was correct and subsequent long taps worked fine.
Attached patch Fixes action bar's behaviour (obsolete) — Splinter Review
Brings action bar to valid state when activity is created
Attachment #771507 - Flags: review?(sriram)
I'm still waiting for an access to try server, so patch was tested with my local build only.
Status: NEW → ASSIGNED
Comment on attachment 771507 [details] [diff] [review]
Fixes action bar's behaviour

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

Looks good. Let this be next to "setContentView()" call.
Attachment #771507 - Flags: review?(sriram) → review+
Comment on attachment 771507 [details] [diff] [review]
Fixes action bar's behaviour

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

Oops. There should be a check for API version 11!
Attachment #771507 - Flags: review+ → review-
Corrected according to Sriram's comments.
It should be OK now.
Attachment #771507 - Attachment is obsolete: true
Attachment #772319 - Flags: review?(sriram)
Attachment #772319 - Flags: review?(sriram) → review+
https://hg.mozilla.org/mozilla-central/rev/40ae6894b21c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Verified fixed on:
Build: Firefox for Android 25.0a1(2013-07-18)
Device: LG Nexus 4
OS: Android 4.2.2
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
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: