Closed Bug 675920 Opened 9 years ago Closed 9 years ago

Difficult to select text after these steps

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows 7
defect
Not set

Tracking

(firefox7 fixed, firefox8 fixed)

VERIFIED FIXED
Firefox 7
Tracking Status
firefox7 --- fixed
firefox8 --- fixed

People

(Reporter: martijn.martijn, Assigned: mfinkle)

References

Details

Attachments

(1 file)

Steps to reproduce:
- Go to a site with some text in it
- Tap down and hold on some text, until the text selection and the handles come up
- Now Pan down at some other spot than the selection, while holding your finger on the screen, then release.
- Tap down and hold on some text again.

Expected result:
- The text should become selected with the selection handles visible.

Actual result:
- No text select, no selection handles.
Ah wait, never mind, correct steps to reproduce:
1. Go to a site with some text in it
2. Tap down and hold on some text, until the text selection and the handles come up
3. Pan down at some other spot than the selection, then tap on the screen to stop the panning down.
4. Tap down and hold on some text again.

Notice that in step 3, you get this error in the error console:
this._dragger is null
chrome://browser/content/input.js
409

(I thought I filed a bug about this already, but I can't seem to find it)

I guess that error might be causing this issue.
It turns out to be more tricky to reproduce this, than I thought.
For some reason it's easier to reproduce on bugzilla pages like this one, for starters.
I posted a video here. It's not really with the steps to reproduce, but at least it shows you that I'm not crazy.
Sorry, forgot the link to the video: http://www.youtube.com/watch?v=naagyVipAEw

Btw, I filed bug 675950 for the js error mentioned in comment 1.
Attached patch patchSplinter Review
This patch reverts the fix for bug 674515 and uses a different approach. The old fix for bug 674515 forced the finger tap to and up in the selected word, making it possible for tapping on whitespace near a word to cause the selection to not happen.

This patch first clears any existing ranges, then attempts to select the word near the tap. Tapping on whitespace will still allow the selection to happen.

The patch still fixes bug 674515. I also added a null check for "elem".
Assignee: nobody → mark.finkle
Attachment #550211 - Flags: review?(wjohnston)
Comment on attachment 550211 [details] [diff] [review]
patch

Review of attachment 550211 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/chrome/content/content.js
@@ +1367,5 @@
>            utils = elem.contentDocument.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
>            elem = utils.elementFromPoint(x, y, true, false);
>          }
> +        if (!elem)
> +          return;

I'm surprised we need to do this at all.... ever. I guess this means the coordinates are outside this document.
Attachment #550211 - Flags: review?(wjohnston) → review+
http://hg.mozilla.org/mozilla-central/rev/3735fb1cd5ef

Please re-verify bug 674515 as well.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Verified fixed in today's Nightly on the LG Optimus Black. Thanks for fixing!
Status: RESOLVED → VERIFIED
Comment on attachment 550211 [details] [diff] [review]
patch

mobile only and it helps stabilize the text selection feature
Attachment #550211 - Flags: approval-mozilla-aurora?
Comment on attachment 550211 [details] [diff] [review]
patch

Approved for releases/mozilla-aurora. Please land ASAP.
Attachment #550211 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.