Skip to content

Commit

Permalink
Merge 403f4b7 into 0ba65f2
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannipiller authored Nov 5, 2018
2 parents 0ba65f2 + 403f4b7 commit 010b894
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/view/items/element/attribute/getUpdateDelegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,14 @@ function updateStringValue(reset) {

this.node._ractive.value = value;

this.node.value = safeToStringValue(value);
this.node.setAttribute('value', safeToStringValue(value));
const safeValue = safeToStringValue(value);

// fixes #3281 – Safari moves caret position when setting an input value to the same value
if (this.node.value !== safeValue) {
this.node.value = safeValue;
}

this.node.setAttribute('value', safeValue);
}
}
}
Expand Down

0 comments on commit 010b894

Please sign in to comment.