diff --git a/src/LiveComponent/assets/dist/live_controller.js b/src/LiveComponent/assets/dist/live_controller.js index 1b10687188b..5fc487f450f 100644 --- a/src/LiveComponent/assets/dist/live_controller.js +++ b/src/LiveComponent/assets/dist/live_controller.js @@ -1374,9 +1374,9 @@ function executeMorphdom(rootFromElement, rootToElement, modifiedFieldElements, if (modifiedFieldElements.includes(fromEl)) { setValueOnElement(toEl, getElementValue(fromEl)); } - if (fromEl === document.activeElement - && fromEl !== document.body - && null !== getModelDirectiveFromElement(fromEl, false)) { + if (fromEl === document.activeElement && + fromEl !== document.body && + null !== getModelDirectiveFromElement(fromEl, false)) { setValueOnElement(toEl, getElementValue(fromEl)); } const elementChanges = externalMutationTracker.getChangedElement(fromEl); diff --git a/src/LiveComponent/assets/src/morphdom.ts b/src/LiveComponent/assets/src/morphdom.ts index 534ba95ab37..d56f0f45f36 100644 --- a/src/LiveComponent/assets/src/morphdom.ts +++ b/src/LiveComponent/assets/src/morphdom.ts @@ -110,9 +110,10 @@ export function executeMorphdom( // We skip this for non-model elements and allow this to either // maintain the value if changed (see code above) or for the // morphing process to update it to the value from the server. - if (fromEl === document.activeElement - && fromEl !== document.body - && null !== getModelDirectiveFromElement(fromEl, false) + if ( + fromEl === document.activeElement && + fromEl !== document.body && + null !== getModelDirectiveFromElement(fromEl, false) ) { setValueOnElement(toEl, getElementValue(fromEl)); }