[Text Selection] Distinguish difference between scroll-end and touch on non-editable place

RESOLVED DUPLICATE of bug 1090008

Status

P1
normal
RESOLVED DUPLICATE of bug 1090008
4 years ago
4 years ago

People

(Reporter: gduan, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

In Gaia code, we hide bubble when I receive selectionchange event which has no mouseup and selectall in "reasons". So, in below two cases, 

1. when bubble has already showed and user try to scroll the content,

> > I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"{\"rect\":{\"width\":320,\"height\":303.33331298828125,\"top\":30,\"bottom\":333.33331298828125,\"left\":0,\"right\":320},\"commands\":{\"canSelectAll\":true,\"canCut\":false,\"canCopy\":true,\"canPaste\":false},\"zoomFactor\":1,\"reasons\":[\"drag\",\"mousedown\"],\"isCollapsed\":true,\"msg_name\":\"selectionchange\",\"offsetX\":0,\"offsetY\":0}" 
> > I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"{\"rect\":{\"width\":320,\"height\":303.33331298828125,\"top\":30,\"bottom\":333.33331298828125,\"left\":0,\"right\":320},\"commands\":{\"canSelectAll\":true,\"canCut\":false,\"canCopy\":true,\"canPaste\":false},\"zoomFactor\":1,\"reasons\":[],\"isCollapsed\":true,\"msg_name\":\"selectionchange\",\"offsetX\":0,\"offsetY\":0}" 
> > I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"scrollviewchange" 
> > I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"{\"state\":\"started\",\"scrollX\":0,\"scrollY\":89,\"msg_name\":\"scrollviewchange\"}" 
> > I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"scrollviewchange" 
> > I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"{\"state\":\"stopped\",\"scrollX\":0,\"scrollY\":104,\"msg_name\":\"scrollviewchange\"}"

2. when bubble has already showed and user click other non-editable place
I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"{\"rect\":{\"width\":320,\"height\":303.33331298828125,\"top\":30,\"bottom\":333.33331298828125,\"left\":0,\"right\":320},\"commands\":{\"canSelectAll\":true,\"canCut\":false,\"canCopy\":true,\"canPaste\":false},\"zoomFactor\":1,\"reasons\":[\"drag\",\"mousedown\"],\"isCollapsed\":true,\"msg_name\":\"selectionchange\",\"offsetX\":0,\"offsetY\":0}" 
I/GeckoConsole( 5858): Content JS LOG: [Dump: TextSelectionDialog]"{\"rect\":{\"width\":320,\"height\":303.33331298828125,\"top\":30,\"bottom\":333.33331298828125,\"left\":0,\"right\":320},\"commands\":{\"canSelectAll\":true,\"canCut\":false,\"canCopy\":true,\"canPaste\":false},\"zoomFactor\":1,\"reasons\":[],\"isCollapsed\":true,\"msg_name\":\"selectionchange\",\"offsetX\":0,\"offsetY\":0}" 


Gaia receive two similar events in above two cases which show hide the bubble after receiving that. 
However, for scrolling case, we actually hide the bubble before scroll, so I have no proper pre-condition to identify whether we should go to scrolling state or not.

We should prevent below failure steps:
1. launch a text_selection bubble
2. click on non-editable place
3. scroll the content   =>  bubble shows and the options are the same as step 1
(The bubble shows the same content, because we don't want to clear the cache of previous successful event for scrolling case.)
Hi Peter,
any idea for it?
Blocks: 1023688
Flags: needinfo?(pchang)

Comment 2

4 years ago
(In reply to George Duan [:gduan] [:喬智] from comment #1)
> Hi Peter,
> any idea for it?

With latest gecko, I didn't see the selectionchange event before scroll start. Could you check again?
Flags: needinfo?(pchang) → needinfo?(gduan)
As offline discussed, the selectionchange event may come from b2g process.
Flags: needinfo?(gduan) → needinfo?(pchang)

Updated

4 years ago
Flags: needinfo?(pchang)
Priority: -- → P1

Updated

4 years ago
Depends on: 1090008

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1090008
You need to log in before you can comment on or make changes to this bug.