`onBeforeInput` needs to be monkey patched
See original GitHub issueAlthough it is part of the spec the beforeinput
event is only available in Chrome at the time of this writing. Neither Firefox nor Safari or IE implement it. But although Chrome has it, it seems to have issues because it can’t be prevented. This breaks the popular slate-react bindings for the slate
rich-text-editor component.
We need to normalize the event in compat. There are a few hints on how to do so in the react code base, but they’re somewhat outdated and we need to reassess the current support status in browsers.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Monkey patching: What is it and should you be using it? - DEV ...
A monkey patch is a way to change, extend, or modify a library, plugin, or supporting system software locally. This means applying a...
Read more >Checking if a JavaScript native function is monkey patched
Delving deep into how to determine whether a JavaScript native function has been monkey patched, and why it's not possible to determine it ......
Read more >What is monkey patching? - python - Stack Overflow
It's simply the dynamic replacement of attributes at runtime. For instance, consider a class that has a method get_data . This method does...
Read more >Should I use Monkey Patching in JavaScript? | by David Fekke
Monkey Patching is the capability in JavaScript to swap out a function in a JavaScript object with your own function. This can come...
Read more >Pragmatic Uses of Monkey Patching in JavaScript - SitePoint
Vildan Softic looks at using monkey patching to alter code at runtime, arguing developers should understand how to safely use this ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am not sure if this is the same issue, breaking slate in mobile browser. I am trying to integrate slatejs in my preact application. Everything worked fine on desktop but it broke in the mobile browser (Android - Chrome).
I have created a sample application.
https://github.com/upendradevsingh/slate-demo
This can be a browser polyfill independent of preact