Closed Bug 1212700 Opened 4 years ago Closed 4 years ago

Cannot trigger select word in the search input of google.com

Categories

(Firefox OS Graveyard :: Gaia::System, defect, P2)

defect

Tracking

(blocking-b2g:2.5+)

RESOLVED FIXED
blocking-b2g 2.5+

People

(Reporter: TYLin, Assigned: apastor)

References

(Blocks 1 open bug)

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

Steps to reproduce:
1. Open www.google.com on B2G browser.
2. Type some text into the search box.
3. Long press on a word.

Expected result:
The word should be selected, and copy & paste bubble shows.

Actual result:
No thing happens, but it's OK to select words on other non-editable text like the search result.
Hi Alberto, 

Would you take a look on this issue? I bisect to bug 1207928. The contextmenu is always handled when long pressing on the google search <input>. If the contextmenu is handled, APZ will not fire long tap event. Thus no select-word is happened. 

The |detail| at line [1] is 

{"systemTargets":[{"nodeName":"INPUT","data":{"documentURI":"https://www.google.com.tw/?gfe_rd=cr&ei=nzgWVunKJ5PZ8QWIp5_gCw","action":"https://www.google.com.tw/search","method":"get","name":"q"}}],"contextmenu":null,"clientX":133,"clientY":25,"screenX":133,"screenY":99,"msg_name":"contextmenu"}

However, the |items| at line [2] is an empty list. No context menu is shown.

[1] https://github.com/albertopq/gaia/blob/e05aa4c1e38e06b87cb2c6b8b1a96159e8e8bed2/apps/system/js/browser_context_menu.js#L41
[2] https://github.com/albertopq/gaia/blob/e05aa4c1e38e06b87cb2c6b8b1a96159e8e8bed2/apps/system/js/browser_context_menu.js#L64
Depends on: 1207928
Flags: needinfo?(apastor)
Component: Selection → Gaia::System
Product: Core → Firefox OS
[Blocking Requested - why for this release]: Broken feature
blocking-b2g: --- → 2.5?
Blocks 2.5 with a P2 priority.
blocking-b2g: 2.5? → 2.5+
Priority: -- → P2
Whiteboard: [systemsfe]
Assignee: nobody → apastor
Flags: needinfo?(apastor)
Comment on attachment 8673131 [details] [review]
[gaia] albertopq:1212700-trigger-select > mozilla-b2g:master

I didn't want to overcomplicate this, when the Pinning setting is going to go away at some point, so basically I'm checking that items length > 1 before stopping propagation.
Attachment #8673131 - Flags: review?(etienne)
Comment on attachment 8673131 [details] [review]
[gaia] albertopq:1212700-trigger-select > mozilla-b2g:master

Let's see if Michael can take a look, as Etienne is going to be busy reviewing the statusbar soon :)
Attachment #8673131 - Flags: review?(etienne) → review?(mhenretty)
Comment on attachment 8673131 [details] [review]
[gaia] albertopq:1212700-trigger-select > mozilla-b2g:master

A little unfortunate that we have to call the same method twice in a row, but since we are removing the pinning setting soon this works for now.
Attachment #8673131 - Flags: review?(mhenretty)
Comment on attachment 8673131 [details] [review]
[gaia] albertopq:1212700-trigger-select > mozilla-b2g:master

Due to a bug in FF nightly, my select menus aren't working. Meant to give r+
Attachment #8673131 - Flags: review+
master: https://github.com/mozilla-b2g/gaia/commit/a84b370737044ba58e13422efdc6bc0400dd37ce
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.