slate icon indicating copy to clipboard operation
slate copied to clipboard

slate-dev-environment `HAS_INPUT_EVENTS_LEVEL_2` is bug in chrome@105+ (Slate 0.47)

Open WuQiuYang opened this issue 2 years ago • 4 comments

Description

slate-dev-environment: HAS_INPUT_EVENTS_LEVEL_2 is bug in chrome@105+

image

Expectation because of : slate-env-bug

Environment

  • Slate Version: [0.47]
  • Operating System: [mac m1]
  • Browser: [Chrome 105.0.5195.52 (x86_64)]

WuQiuYang avatar Sep 01 '22 09:09 WuQiuYang

HAS_INPUT_EVENTS_LEVEL_2 === true in Chrome 105, coz 'onbeforeinput' in element === true, so there is no any issue with level2 input events detection.

There is one another issue, please check my comment here - https://github.com/ianstormtaylor/slate/issues/5110#issuecomment-1234951122

zarv1k avatar Sep 02 '22 06:09 zarv1k

Note this does not appear to be an issue with any recent versions of Slate, only with versions released more than 3 years ago. We'll leave this open so you can sort through it, but Slate won't be releasing an update to a version this far back.

dylans avatar Sep 02 '22 13:09 dylans

My team is still in the process of upgrading old slate to new slate (hefty rich text editor), so here's the super janky fix I'm using temporarily to resolve this issue for our old editor (note that this does cause webpack to complain)

In my package.json:

  "resolutions": {
    "slate-dev-environment": "0.1.4"
  },

Forcing slate-dev-environment to an older version doesn't export HAS_INPUT_EVENTS_LEVEL_2, which seems to many of the issues related to it. Of course webpack complains with a warning that this isn't exported.

gdehmlow avatar Sep 02 '22 20:09 gdehmlow

@gdehmlow thanks for this! Is there anything else involved in making this work? I can't find any documentation around slate-dev-environment so not sure if I need to import it or what to make it work. Thanks!

lupos avatar Sep 09 '22 19:09 lupos

Hi @dylans, is 0.47.x branch no longer maintained?

I found a workaround for this one...

Using slate 0.47 and chrome 105+

I run this code on a

nbarrera avatar Oct 31 '22 19:10 nbarrera

Hi @dylans, is 0.47.x branch no longer maintained?

0.47.x pre-dates my involvement with Slate. I can merge it but I have no idea if our release scripts support an update that far back (things as simple as long deprecated versions of Node.js, so would it build, etc.).

dylans avatar Oct 31 '22 21:10 dylans