File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
assets/js/phoenix_live_view Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -542,9 +542,12 @@ const DOM = {
542542 // when an input is back in its "original state", because the attribute
543543 // was never changed, see:
544544 // https://github.com/phoenixframework/phoenix_live_view/issues/2163
545- if ( name === "value" && target . value === source . value ) {
546- // actually set the value attribute to sync it with the value property
547- target . setAttribute ( "value" , source . getAttribute ( name ) ) ;
545+ if ( name === "value" ) {
546+ const sourceValue = source . value ?? source . getAttribute ( name ) ;
547+ if ( target . value === sourceValue ) {
548+ // actually set the value attribute to sync it with the value property
549+ target . setAttribute ( "value" , source . getAttribute ( name ) ) ;
550+ }
548551 }
549552 }
550553 }
You can’t perform that action at this time.
0 commit comments