File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -912,9 +912,11 @@ fn JsonEditor(
912912 textarea_ref : NodeRef < html:: Textarea > ,
913913 initial_value : String ,
914914) -> impl IntoView {
915- // Mount needs both the editor div and the textarea loaded, and their load
916- // order isn't guaranteed, so drive it off both `on_load`s and fire on
917- // whichever lands last (the guard makes the other a no-op).
915+ // Mount needs both the editor div and the textarea. The div is DOM-ordered
916+ // after the textarea, so the div's `on_load` alone would suffice; both are
917+ // wired so the mount fires on whichever ref lands last (`on_load` is
918+ // effect-based and fires even for a ref already loaded when registered),
919+ // and the guard makes the redundant call a no-op.
918920 let mounted = StoredValue :: new ( false ) ;
919921 let init = StoredValue :: new ( initial_value) ;
920922 let try_mount = move || {
You can’t perform that action at this time.
0 commit comments