Closed Bug 1105547 Opened 7 years ago Closed 7 years ago

[CopyPaste] Copy icon appears on the "Option screen"

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(b2g-v2.0 unaffected, b2g-v2.1 unaffected, b2g-v2.2 affected)

RESOLVED FIXED
Tracking Status
b2g-v2.0 --- unaffected
b2g-v2.1 --- unaffected
b2g-v2.2 --- affected

People

(Reporter: sarsenyev, Assigned: gduan)

References

Details

Attachments

(3 files)

Attached file log1126
Description:
When selecting a text the copy icon appears, this icon doesn't disappear even on the option screen
   
Repro Steps:
1) Update a Flame device to BuildID: 20141126040207
2) Open "Browser" and in the URL bar type "cnn.com
3) Select any text(not hyperlink) to make the "Copy" icon
4) Tap the "..." to open the option menu
5) Observe the screen
  
Actual:
The "Copy" icon appear on the option screen
  
Expected: 
The "Copy" icon disappear on the option screen
  
Environmental Variables:

"Flame 2.2

Device: Flame 2.2  (319mb)(Kitkat Base)(Shallow Flash)
Build ID: 20141126040207
Gaia: 41b7be7c67167f367c3c4982ff08651d55455373
Gecko: 7bcc6573d204
Version: 36.0a1 (2.2)
Firmware Version: v188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0
"  

Repro frequency: 100%
See attached: (screenshot, video clip, logcat, etc.)
Attached image 2014-11-26-15-33-06.png
This future is implemented only 2.2
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(dharris)
This appears to be a new feature for 2.2 NI the component owner for the selection tools.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(dharris) → needinfo?(gchang)
NI developer for this.
Flags: needinfo?(gchang) → needinfo?(gduan)
Please try latest build, I think the issues is fixed already.
Flags: needinfo?(gduan) → needinfo?(sarsenyev)
The issue still repros on Flame 2.2 
added a link to the YouTube video http://youtu.be/c6HfP_r2C2Q

"Flame 2.2

Environmental Variables:
Device: Flame 2.2 (319mb)(Kitkat Base)(Full Flash)
Build ID: 20141215040201
Gaia: e2a3e606675c346b6e6f35351a458040be599b09
Gecko: f14dcd1c8c0b
Gonk: 263b5f41f7733c5577fb101eb4dc8ac5c11cfa8d
Version: 37.0a1 (2.2)
Firmware Version: v188-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0"
Flags: needinfo?(sarsenyev)
Actually, it's a little hard to reproduce.

Hi Peter,
I have to ni you for it.
I find a easy way to reproduce it.

1. open browser, and go to cnn.com
2. long press content to launch text_selection bubble
3. scroll the page and click the '...' button before the bubble shows

Then we can see the result as this bug described. There would be no selectionstatechanged received anymore  when click '...' button.

And one more thing. When I try to load yahoo.com, and go to news page and long-press content to launch bubble, I find gaia has received unexpeted selectionstatechanged event which caused bubble hidden.
Flags: needinfo?(pchang)
Flags: needinfo?(pchang)
Priority: -- → P2
(In reply to George Duan [:gduan] [:喬智] from comment #7)
> Actually, it's a little hard to reproduce.
> 
> Hi Peter,
> I have to ni you for it.
> I find a easy way to reproduce it.
> 
> 1. open browser, and go to cnn.com
> 2. long press content to launch text_selection bubble
> 3. scroll the page and click the '...' button before the bubble shows
> 
> Then we can see the result as this bug described. There would be no
> selectionstatechanged received anymore  when click '...' button.
> 
> And one more thing. When I try to load yahoo.com, and go to news page and
> long-press content to launch bubble, I find gaia has received unexpeted
> selectionstatechanged event which caused bubble hidden.

George, after bug 1111433 is landed, I think we can solve this problem in gaia since gecko reports the events like the following order. Therefore, gecko doesn't need to maintain the dialog logic. How do you think?

a.ScrollViewChange with Start 
b. SelectionStateChanged with Blur 
c. ScrollViewChange with End
Flags: needinfo?(gduan)
ok, I can set _isSelectionVisible as false when receiving a SelectionStateChanged with Blur once your bug 1111433 is landed.
Flags: needinfo?(gduan)
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][textselection]
Assignee: nobody → gduan
Component: Gaia::System::Window Mgmt → Gaia::System
Summary: [Windows Management] Copy icon appears on the "Option screen" → [CopyPaste] Copy icon appears on the "Option screen"
After bug 1114853 and bug 1110963 are landed, we remove handler for scrollend event, instead, we only redisplay the bubble by selectionstatechanged event after scrolling. 

However, I found out that we will receive two scroll start/end action when scrolling browser page, one is navigation bar and one is page itself. That's why cause this issue.
We also found out that comment 10 is reproducible in cnn.com and tw.news.yahoo.com but not in google.com search result page.

ni Morris for comment 10.
Flags: needinfo?(mtseng)
George, about comment 10 I found a solution. The solution is dispatching scroll end event only when carets is visible. I'll create a another bug for this issue instead of resolving it at this bug.
Flags: needinfo?(mtseng)
I think this bug is already fixed after bug 1114853  and bug 1110963. However, we cannot verify it due to comment 10.

I would set its dependency to bug 1118136.
Depends on: 1118136
Pb still exist.

There are two issues here,
1. When scrolling and touch '...' button , there's a selectionchanged event popping out after the contextmenu display. We need a way to fiter it.
2. When the content scroll end, there would be another series of  selectionchanged + scrollend event coming from other dom (I guess it's contextmenu or url bar) which would cause the bubble display again.
Attached file WIP, wait for verfiy
Hi Morris,
this patch should solve item 1 from comment 15, could you try to test is and see if your patch can fix item 2?
Flags: needinfo?(mtseng)
Patch is updated and works well with morris wip patch(gecko).
also see bug 1121925
Blocks: CopyPasteGaia
No longer blocks: CopyPasteLegacy
QA Whiteboard: [QAnalyst-Triage+][textselection] → [QAnalyst-Triage+][COM=Text Selection]
It's not reproducible anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Flags: needinfo?(mtseng)
You need to log in before you can comment on or make changes to this bug.