Long tapping on a select triggers selection

VERIFIED FIXED

Status

VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: martijn.martijn, Unassigned)

Tracking

Trunk
x86
Windows 7
Dependency tree / graph

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Steps to reproduce:
- Long tap on one of the selects in this bug.

Expected result:
- No text selection, no text selection markers should appear.

Actual result:
- Text select and selection markers appear.
I can't reproduce this on 07/26 Nightly, using the various <selects> here. Do you have another simple test case perhaps?
(Reporter)

Comment 2

7 years ago
Created attachment 548788 [details]
testcase

Ok, this indeed only seems to happen with certain steps to reproduce:
- Tap on the text somewhere.
- Long tap on of the selects.
(Reporter)

Updated

7 years ago
Blocks: 661388
Whiteboard: 661388
Ok I see this, for example long tapping on Version/Platform of any select above will select some random text in these comments below.
This happens because of the way we setup the selection:
1. fake mouse click at tap point. this should set the caret position.
2. select word at caret position

In the case of this bug, #1 fails, but #2 selects the word at the previous tap location.

To fix this, I am adding a test to check if the tap point is in the selection rect. If not, we stop the text selection. It fixes this bug, but also affects other selections.

If the tap is in some whitespace between two words, the code will try to select one of the two words (whichever is closer to the tap), but since the tap was not over one of the words, nothing is selected.

This fix is included in bug 670222
fixed in bug 670222
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

7 years ago
Verified fixed, using today's Nightly on the LG Optimus Black.
Status: RESOLVED → VERIFIED
(Reporter)

Comment 7

7 years ago
Verified fixed in today's Nightly on the LG Optimus Black.
(Reporter)

Updated

7 years ago
Depends on: 670222
You need to log in before you can comment on or make changes to this bug.