Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 889555 - Address bar context menu appear after second long tap
: Address bar context menu appear after second long tap
Product: Firefox for Android
Classification: Client Software
Component: Awesomescreen (show other bugs)
: 25 Branch
: ARM Android
: -- normal (vote)
: Firefox 25
Assigned To: Michal Kajda [:mkajda]
: Sebastian Kaspari (:sebastian)
Depends on:
  Show dependency treegraph
Reported: 2013-07-02 13:31 PDT by Michal Kajda [:mkajda]
Modified: 2016-07-29 14:33 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Fixes action bar's behaviour (1.35 KB, patch)
2013-07-04 16:56 PDT, Michal Kajda [:mkajda]
sriram.mozilla: review-
Details | Diff | Splinter Review
Fixes action bar's behaviour (1.31 KB, patch)
2013-07-08 14:21 PDT, Michal Kajda [:mkajda]
sriram.mozilla: review+
Details | Diff | Splinter Review

Description Michal Kajda [:mkajda] 2013-07-02 13:31:04 PDT
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.
Comment 1 Michal Kajda [:mkajda] 2013-07-02 13:35:59 PDT
Android version 4.2.2
Model: Nexus 4

Reproducible on stable 22.0 and 25 built from repo.
Comment 2 Michal Kajda [:mkajda] 2013-07-02 13:39:00 PDT
I can look into this issue with your help.
If you have any suggestions, please let me know.
Comment 3 Teodora Vermesan (:TeoVermesan) 2013-07-03 02:56:24 PDT
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)
Comment 4 Aaron Train [:aaronmt] 2013-07-03 07:42:16 PDT
Please find a regression-range.
Comment 5 Teodora Vermesan (:TeoVermesan) 2013-07-03 08:51:13 PDT
If on Firefox for Android 15 the same behaviour happens, shall I go deeper and install older builds and find the regression-range?
Comment 6 Aaron Train [:aaronmt] 2013-07-03 09:01:29 PDT
No. It would seem then that this has been around for some time then.
Comment 7 Michal Kajda [:mkajda] 2013-07-03 11:34:59 PDT
Could anyone assign bug to me please?
Comment 8 Michal Kajda [:mkajda] 2013-07-04 16:53:13 PDT
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.

After that, state of action bar was correct and subsequent long taps worked fine.
Comment 9 Michal Kajda [:mkajda] 2013-07-04 16:56:35 PDT
Created attachment 771507 [details] [diff] [review]
Fixes action bar's behaviour

Brings action bar to valid state when activity is created
Comment 10 Michal Kajda [:mkajda] 2013-07-04 16:59:02 PDT
I'm still waiting for an access to try server, so patch was tested with my local build only.
Comment 11 Sriram Ramasubramanian [:sriram] 2013-07-08 12:49:01 PDT
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.
Comment 12 Sriram Ramasubramanian [:sriram] 2013-07-08 12:51:43 PDT
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!
Comment 13 Michal Kajda [:mkajda] 2013-07-08 14:21:18 PDT
Created attachment 772319 [details] [diff] [review]
Fixes action bar's behaviour

Corrected according to Sriram's comments.
It should be OK now.
Comment 14 Sriram Ramasubramanian [:sriram] 2013-07-10 11:14:44 PDT
Comment 15 Ed Morley [:emorley] 2013-07-11 03:05:44 PDT
Comment 16 Mihai Pop 2013-07-19 02:56:32 PDT
Verified fixed on:
Build: Firefox for Android 25.0a1(2013-07-18)
Device: LG Nexus 4
OS: Android 4.2.2

Note You need to log in before you can comment on or make changes to this bug.