Closed Bug 1448730 Opened 8 years ago Closed 6 years ago

After a longpress in an input or textarea, Firefox Android selects the previous word even when there's a space

Categories

(Core :: DOM: Selection, defect, P1)

60 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla71
Webcompat Priority ?
Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: karlcow, Assigned: m_kato)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webcompat] [geckoview:m1909])

Attachments

(1 file)

This is a spin-off of https://webcompat.com/issues/15953 The initial bug report ====================== STR: 0. Prerequisite: have something in your clipboard, that you want to paste 1. start a new tweet (either replying or with a brand new tweet) 2. write a word, either followed or not followed by a space. The cursor will be after the space. 3. Longpress in the empty space at the right of the word => The space and the previous word are selected, and the context menu with "paste" appears. As a result, when pasting, the previous word is replaced too, which is unexpected with this flow. The behavior is correct in Chrome (eg: the word isn't selected unless we longpress on the word itself). I initially thought this would happen in Twitter only but actually this happens everywhere there's an input (either input text, or textarea). But this is especially painful in Twitter where it's common that we want to paste something. The workaround is to start a new word that will get replaced. ====================== The key in the initial bug report: "This happens everywhere" And indeed I tried with just https://codepen.io/webcompat/pen/ZxXKxr And I could reproduce. Chrome is handling in a more elegant way probably. Is there something which prevents us to make this part of the UX more seamless.
Summary: While writing a tweet, longpressing selects the previous word even when there's a space → After a longpress in an input or textarea, Firefox Android selects the previous word even when there's a space

I don't like current longtap behavior, and I think that Chrome's way is better. Although this issue is accessibility caret, I take this.

Assignee: nobody → m_kato

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

A similar bug was reported in the Fenix issue tracker: https://github.com/mozilla-mobile/fenix/issues/2860

Whiteboard: [webcompat] → [webcompat] [geckoview:fenix:p2]

Adding [geckoview:fenix:m8] whiteboard tag because Makoto says he will work on this bug in Q3.

Whiteboard: [webcompat] [geckoview:fenix:p2] → [webcompat] [geckoview:fenix:m8]

Moving to the GeckoView Bugzilla component.

Component: Keyboards and IME → General
Product: Firefox for Android → GeckoView

dbolter said he'd like to see this bug fixed in Q3.

Priority: P3 → P2
Summary: After a longpress in an input or textarea, Firefox Android selects the previous word even when there's a space → After a longpress in an input or textarea, Firefox Android selects the previous word even when there's a space
Whiteboard: [webcompat] [geckoview:fenix:m8] → [webcompat] [geckoview:fenix:m8] [geckoview:m1909]

Adding this bug to GV's September sprint.

Priority: P2 → P1
Whiteboard: [webcompat] [geckoview:fenix:m8] [geckoview:m1909] → [webcompat] [geckoview:m1909]

Actually, Gecko's long tap implementation will select a word string near tapped area even if tapped area isn't text. But even if it is white space only, not word, we select white space.

Since Blink doesn't select it and user reports this issue via web compat, I would not like to select white space only text if tapped area isn't text.

If tapped point is on white space text, it keeps original behaviour that selects white space.

Attachment #9093224 - Attachment description: Bug 1448730 - Long tap doesn't select whitespace only if tapped point isn't text. → Bug 1448730 - Long tap doesn't select word if tapped point isn't text.
Component: General → Selection
Product: GeckoView → Core

In general, I think this is a good improvement because people like to long tap to show the context menu all the time. An alternative way to force show the context menu is:

  1. Single tap at the empty area, and the blue caret should show at where the blinking cursor is.
  2. Tap on the blue caret, the context menu will show.

This also works on Google Chrome.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/dd1ab53baf97 Long tap doesn't select word if tapped point isn't text. r=TYLin
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: