Bug: Firefox Android not triggering onSelect in <input> when dragging cursor

This issue has been created since 2022-11-07.

React version:

Steps To Reproduce

  1. Open the codepen linked below in Firefox on Android ( I suspect it's also a bug in Iphone but cannot confirm)
  2. Write some text in the text input
  3. Drag the cursor
  4. Notice that the event is not triggered when the cursor is dragged

Link to code example: https://codepen.io/AndreasBBS/pen/ExRgdgN (codesandbox was down at the moment I was testing this)

The current behavior



The expected behavior



Extra Details

This seems to have to do with how Firefox implements the selectionchange event for inputs. According to this documentation, firefox fires the selectionchange event on the input node instead of on document. In fact, if you try the little snippet they have in the documentation you'll find that it only works on Firefox and not any other browser.
I'm not sure if other browsers are gonna move in this direction, but if they do, this bug will become more common. Chrome already has a bug report and if they 'fix' it, this behavior will also happen there.

AndreasBBS wrote this answer on 2022-11-07

I believe something in here needs to be changed. There's a comment saying:

    // Firefox doesn't support selectionchange, so check selection status
    // after each key entry. The selection changes after keydown and before
    // keyup, but we check on keydown as well in the case of holding down a
    // key, when multiple keydown events are fired but only one keyup is.
    // This is also our approach for IE handling, for the reason above.

But according to Firefox documentation it's not true: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/selectionchange_event

AndreasBBS wrote this answer on 2022-11-14

I've been trying to fix this and I can't get the event triggered on the input node to even reach the SelectEventPlugin.js
@gaearon @kassens Sorry to bother but I noticed that you've been involved in the implementation of this plugin. Could you give me some directions on how you think that conceptually I could integrate the behavior supported by Firefox into this plugin?

More Details About Repo
Owner Name facebook
Repo Name react
Full Name facebook/react
Language JavaScript
Created Date 2013-05-24
Updated Date 2022-12-10
Star Count 198882
Watcher Count 6638
Fork Count 41302
Issue Count 1120


Issue Title Created Date Comment Count Updated Date
[Firmware] Comment about RGB and RGBW not able to be mixed in same chian is no longer accurate 0 2022-09-22 2022-11-14
BOM/Sourcing Guide improvement 5 2022-09-22 2022-11-15
WarnWetter patching crashes after dependency dowbload 2 2022-09-20 2022-10-21
backdrop touch events 2 2019-02-20 2022-10-23
Panel does not come up on android 13 2020-03-24 2022-10-23
How to know when hide() or show() is called? 13 2019-03-01 2022-10-23
steamInit() works fine in editor, fails in exported Windows executable 3 2022-04-21 2022-12-02
macos系统下,挂载网盘后,新建文件夹会不停的建立好多文件夹 1 2022-01-06 2022-09-20
Karte zeigt falsche Infos bei Haltazsfall 0 2021-08-27 2022-02-26
Create custom theme element to drop ggtext dependency 0 2021-12-23 2022-07-16
[feature req] ggcomet? 2 2021-10-21 2021-12-31
passing alpha to geom_mean_lines 2 2021-10-01 2021-12-31
Expected Identifier, string or number with Ancestry GED export 1 2021-03-16 2022-12-01
Freezes when moving a window right after resizing, with Address bar enabled 0 2021-10-30 2022-07-25
Infinite loop in enums analyzer 3 2022-03-17 2022-11-11
Customer unable to change retention 0 2021-06-14 2022-11-23
StatusPage support 0 2021-03-23 2021-12-26
📎 Print the number of files with errors in `check` summary 0 2022-11-08 2022-11-05
📎 `rome init` should read `.prettierrc` and convert options 2 2022-11-08 2022-11-05
📎 Suggest --write command when running `rome format .` 1 2022-11-08 2022-11-05
📎 `init` separators are too long 0 2022-11-08 2022-11-05
How to add Fade in And Fade out effect on div element in Angular 6. 1 2020-06-24 2022-12-02
Case Removed Only For Configurable #5398 0 2021-12-13 2022-01-26
Blocking as a feature for scoring 1 2022-09-24 2022-11-25
the procedure entry point could not be located in the dynamic library 14 2021-10-28 2022-11-04
Feature request: Option settings to disable features other than syntax. 3 2022-02-26 2022-11-29
Seeing this warning: Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead 4 2022-08-25 2022-10-19
Use-BuildEnv should make parameters mandatory 0 2022-10-21 2022-12-09
TypeScript 4.8.2: type error 1 2022-08-30 2022-10-11
Unable to build benchmark locally 2 2021-10-22 2022-12-03
Remove custom formatter 1 2021-11-10 2022-11-28
text detection sample program occurs error, because VGG_CTC.onnx requires float16 input data 3 2021-09-24 2022-11-03
chdir: fixing a malloc'ed buffer that was not large enough (possible mem corruption) 2 2021-06-15 2022-11-08
Drop support for `{framework}-testing-library` module imports 3 2022-08-04 2022-11-25
Breakage: clien.net comment section 0 2022-10-21 2022-10-22
2021-12-15-action1: add a sentence or two to PR [https://github.com/w3c/vc-data-model/pull/847](https://github.com/w3c/vc-data-model/pull/847). (David Chadwick) 1 2021-12-16 2022-12-07
Allow for upgrading RDS engine version 3 2021-01-28 2022-12-09
Support for enum-casts 0 2022-06-01 2022-11-26
how to setup? 0 2013-05-22 2021-11-26
The SDK attempting to unmarshall an error into an exception is failing on Java 17 7 2022-05-06 2022-11-28
AbstractProfilesConfigFileScanner does not support comments starting with ";" 1 2022-04-22 2022-11-28
I want to add my blog 1 2022-10-22 2022-10-18
[bug][Opensearch][OCI runtime create failed: container_linux.go:370: starting container process caused: mounting "/var/lib/kubelet/pods//volume-subpaths/config/opensearch/2" to rootfs at /run/containerd/io.containerd.runtime.v1.linux/k8s.io/opensearch/rootfs/usr/share/opensearch/config/opensearch.yml caused: not a directory: unknown]Unable to deploy opensearch through helm chart 2 2021-12-17 2022-11-12
upload internal sharing problem 3 2021-06-11 2022-10-28
i386到x86-64互刷,引导异常 2 2021-12-28 2022-01-07
bug on commit() 5 2020-03-06 2022-01-10
publish skips unmanagedResourceDirectories 1 2021-03-12 2022-12-09
增加缓存导致获取 package 为null,导致NPE 1 2022-06-29 2022-12-03
test issue 0 2021-08-04 2022-01-03
API Keys for background tasks 1 2019-06-20 2022-12-01