Open natesilva opened 4 years ago
The first answer may help ? https://stackoverflow.com/questions/46000544/react-controlled-input-cursor-jumps
change your @smui/textfield/Input.svelte file so that the valueUpdater function looks like this:
function valueUpdater(e) {
const start = e.target.selectionStart;
const end = e.target.selectionEnd;
switch (type) {
case 'number':
case 'range':
value = toNumber(e.target.value);
break;
case 'file':
files = e.target.files;
// Fall through.
default:
value = e.target.value;
break;
}
requestAnimationFrame(() => {
e.target.selectionStart = start;
e.target.selectionEnd = end;
});
}
Is this regarding desktop Safari?
Hi! This is an error report for the
Textfield
when used on Safari (iOS or macOS).This can be demo’ed with the
Textfield
inputs on https://sveltematerialui.com/demo/textfield/.To reproduce:
<Textfield>
.Expected results:
Actual results: