-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome 105 breaks slate 0.27.x #5110
Comments
Sorry in advance for the stream of consciousness as I debug this... I removed the
Because of this I think we can infer that something in Chrome 105 changed the point |
Interesting, prior to Chrome 105 |
I'm also experiencing some critical issues in Chrome 105 that I've never seen before 105 release, using immutable.js based version of SlateJS editor ( https://codesandbox.io/s/cfdps
I don't think it's the complete list of issues described above, just ones that I was able to reproduce and describe, so the Slate-based editor's behaviour is completely broken in Chrome 105. None of these issues, described above, have ever been reproduced before, neither in any Chrome version prior 105 nor in any other browsers (Safari on macOS, Safari on iOS, FF on any OS, etc.). |
OMG! I can't believe that all the issues in Chrome 105 described in my previous comment here were because of style After some deep investigation, I realized that Please check it out for your case - it might be the root of the issue you are experiencing. |
it's related to #5108 no? |
|
Hi @zarv1k. We're experiencing the exact same problems that you mentioned in the previous comment. And changing the style on I'm wondering if this is the best workaround for now, or do you have a better way to solve this? |
According to comment in sources this style was added just to hide b/i/u menu on iOS (it also disables the same menu items in context menu Font -> Bold etc... on Safari desktop). I'm not sure about Chrome mobile (has no device to check), but you definitely could remove this style completely for Chrome desktop |
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. |
Just want to add that it's also happening on |
FWIW, anything before 0.59 is ~2.5 to 3 years old at this point. |
Point definitely taken :) I appreciate you leaving this open so people still on the old versions can figure out a workaround until we can upgrade (or more likely rewrite in our case since so much has changed) 🙏 |
Hi thanks for this thread, it's very helpful :) |
@ThomasEsseul Why some another workaround needed? Didn't this help you? - #5110 (comment) I have no issues in Chrome 105 using Slate 0.47.8 after I removed |
@zarv1k It does help yes ! I was just wondering if there were any new informations on this. I think I will go for this solution then, thanks :) |
We have same problem with version:
We have some schema validation as below:
Firstly, when we add node with 'cloud' type everything works great, but when i want to change text inside, text goes at beginning of whole document and node disappear. If i removed unwrapInline, all works seems to works great but validation fire twice so every typed char it added me spaces at end... ;d I think we should plan complety rewrite editor to latest version 😄 |
My team found that in previous versions of Chrome (before 105), the event fired was actually a React synthetic event. We spent a while trying to debug what changed with We quickly fixed our prod issues by, for now, forking our version of slate and returning early if we are in in Chromium 105+, but we may explore the WebkitUserModify fix as well. |
My team published a hotfix with the WebkitUserModify solution, it seems to work fine ! |
Thank you. Code like this works for me: |
Back from out of internet range and can confirm that the |
Just chiming in - my team is at the tail end of a rewrite on the latest and greatest, but our production app is facing this issue as well.
So far, the |
The fix to resolve to an earlier version of "resolutions": {
"slate-dev-environment": "0.1.4"
}, |
It seems like between the two workarounds mentioned in this issue, everyone should be able to workaround this issue. Is anyone not able to get their editor working with the provided workarounds? |
Override the `-webkit-user-modify: read-write-plaintext-only` style that is added by slate to the editor element that causes a cursor jumping bug in Chrome 105. Details at ianstormtaylor/slate#5110
Thank you for pointing this out. I was seeing the following bugs on slate 0.47
But now they are fixed, and I used the following modification: As well as importing Hope that helps someone. |
If you want a CSS only solution to targeting Blink-based browsers (i.e. not Safari), you can use: @supports not (-apple-trailing-word: inherit) {
div[data-slate-editor] {
-webkit-user-modify: read-write !important;
}
} |
@ThomasEsseul
Yes, we meet the exact same problem with ê, â ... characters.
We applied the Does anyone knows a fix around this particular issue? |
@bobey did you try forcing resolution of Note that the syntax @CodyJamesCasey provided is for |
Hi @slapbox, thanks for your help on this. I tried indeed but I get a compilation error as my slate version seems to try loading a constant which is not exported anymore:
Am I missing something here? We're using the following versions ATM: {
"dependencies": {
"slate": "0.47.4",
"slate-html-serializer": "0.8.6",
"slate-plain-serializer": "0.7.6",
"slate-react": "0.22.4",
"...": "..."
},
"resolutions": {
"slate-dev-environment": "0.1.6"
}
} |
If you use Webpack you could try using |
Ok So I thought I would explain the way I fixed this bug because some of the provided solutions did not work for us: What did work was:
run yarn / npm install and that's it Anyway it's really a pain to have to work on legacy code has not been upgraded since 3 years but it is what it is. |
Hi all, I'd like to thank everyone here who shared feedbacks and tips to help fix this issue. Just to let you know that we applied all options shared here, even @mathisobadia's one, it fixes part of the bug on our side but we still have a failure with accented characters. If someone discover a fix for this particular issue, do not hesitate to share it 🙏 |
Hi there...
on Google Chrome 105+ they added a new way of setting the so precisely, slate was detecting on which input event level the browser is at... by detecting if any given DOM element supports the So with this fix... we make slate think that Chrome 105+ and Chrome < 105 are in the same input event level there is a side effect which is that you won't be able to define a |
For anyone curious, the problem code in var FEATURE_RULES = [['inputeventslevel1', function (window) {
var event = window.InputEvent ? new window.InputEvent('input') : {};
var support = 'inputType' in event;
return support;
}], ['inputeventslevel2', function (window) {
var element = window.document.createElement('div');
element.contentEditable = true;
var support = 'onbeforeinput' in element;
return support;
}]]; What would be the implications of |
Thank you so much @nbarrera, your tips helped us temporarily fix our issue with ê, â ... characters. |
Was able to determine that this was the problem by bisecting our Electron upgrade and identifying which chrome version bump broke it, and then googling for slate + chrome version. It looks like this entire concept of webkit-user-modify is deprecated, so I have no idea why this matters, but it looks like they changed the default to read-write-plaintext and it broke Slate for everyone. ianstormtaylor/slate#5110
Description
Our application (an electronic health record) uses slate in production; versions:
The update to Chrome 105 now rolling out breaks the ability for slate to find a DOM point, it looks like.
In the above screenshot you can see that leaf will be null as
end
is zero andpoint.offset
is 2, meaning the condition ofend >= point.offset
will never be satisfied.I realize we're on an old version of slate but if there's a known fix for Chrome 105 issues or a link to crbug for whatever the regression is there we would be very grateful.
Recording
Will follow up with a GIF.
Environment
The text was updated successfully, but these errors were encountered: