-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bug: IE11, Edge and all Preact versions - textarea caret position #326
Comments
Looks like a bug! Since Preact's debouncing isn't as tight async in IE, this triggers an issue where the state of the internal representation doesn't match the DOM's state. Here's a fiddle showing a manual fix (the third Basically this line: should be changed to: if (!(name in old) || attrs[name]!=(name==='value' || name==='checked' ? dom : old)[name]) { I'll have to check the performance implications of this. |
Thank you, I took the version of Fiddle, as a temporary solution. |
@developit It seems as though this issue made its way back. I'm running into the same issue in IE11 using preact@8.2.6. I haven't yet had much success identifying the reason but wanted to give you a heads up in case you have any ideas. |
I came across this bug as well (on preact v8.2.5) and chatted with @developit about it. I figured I'd repost my findings here for future readers who find this issue. The first thing I did was see if the same bug happens in React (it doesn't).
After some experimenting, I noticed that changing from I shared this "fix" (i.e. workaround) to @developit, and he pointed out that it wouldn't behave the same if you are setting
If you're always assigning to a string, the performance impact of this difference should be minimal. Given that it works just fine in other browsers, I'm interested in coming up with a minimal repro that uses only vanilla DOM APIs (not preact), so that we could post a bug report for Edge. I haven't yet come up with a minimal repro outside of preact though. Update: A better workaround is to replace |
Greetings! We use Preact on one project, he is very good with the file size, but we have recently found a nasty bug. In browsers IIE11 and Edge when editing in the middle message, of the cursor moves to the last character, demo http://jsfiddle.net/d2wtu9jz/2/
The text was updated successfully, but these errors were encountered: