-
Notifications
You must be signed in to change notification settings - Fork 14
<textarea> resets caret position in MS Edge #55
Comments
Hello @fsoikin , By using the property open Fable.Core.JsInterop
open Fable.Arch
open Fable.Arch.Html
open Fable.Arch.App
let initModel = ""
let view model =
div []
[ textarea [onKeyup (fun e -> unbox<string> e?target?value)
property "value" model
] []
span [] [text model] ]
let update model msg = msg, []
createApp initModel view update Virtualdom.createRender
|> withStartNodeSelector "#root"
|> start
|> ignore |
Using What's worse, this keystroke skipping happens in Chrome, FireFox, and Edge (haven't checked any other browsers). My intuition tells me that this looks like some race condition somewhere, but I haven't debugged. |
I will need to take a dipper look so. Sorry for the inconvenience |
Issue: In Microsoft Edge, a
<textarea>
element whose content is bound to model in some way doesn't keep caret position between model updates.Works fine in Chrome and FireFox. I can't be sure that the issue is with Fable.Arch and not with VirtualDom or with MS Edge. But since both VirtualDom and Edge are widely used, I think I can reasonable expect bugs like this to get fixed quickly.
App code:
Behavior in Chrome: (normal)
Behavior in MS Edge: (buggy)
The text was updated successfully, but these errors were encountered: