Closed setdvd closed 6 years ago
It looks like not an Elm issue
Example code:
module Playground exposing (..)
import Browser
import Html exposing (Html, div, text)
import Html.Events exposing (onClick)
main : Program () Model Msg
main =
Browser.document
{ init = \_ -> (someText, Cmd.none)
, view = view
, update = update
, subscriptions = subscriptions
}
subscriptions : Model -> Sub Msg
subscriptions _ =
Sub.none
someText = "someText"
otherText = "otherText"
type alias Model = String
type Msg = Click
update msg model =
case model == someText of
True -> (otherText, Cmd.none)
False -> (someText, Cmd.none)
view: String -> Browser.Document Msg
view t =
{ title = "Playground"
, body =
[ div
[onClick Click]
[text (Debug.log "current text" t)]
]
}
Doesn't work when Stay Focus Chrome plugin is enabled.
When I disable one - every start working as expected. One more note this is not reproduced in Browser.sandbox mode
The content editable stuff seems too wild for official support. I don't think we can give any guarantees about it at this time.
Hi!
Trying to change contenteditable prop like this:
expected behavior: prop changes based on the focused value
actual behavior: contenteditable value stays same after the first render
Elm 0.19.0