Fix annotation input focus trap regression in Safari (#13232)
`setSelectionRange(0, 0)` added in 44b24fcc29
for #12359, required only by Firefox ([bug](https://bugzilla.mozilla.org/show_bug.cgi?id=860329)), causes issues mozilla#13191, mozilla#12592 in Safari.
`scrollLeft = 0` is a fix that breaks the focus trap in Safari while **keeping Firefox behavior same for #12359**.
This commit is contained in:
parent
3d2d8002b0
commit
d498897ab5
@ -668,7 +668,8 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
|||||||
if (elementData.formattedValue) {
|
if (elementData.formattedValue) {
|
||||||
event.target.value = elementData.formattedValue;
|
event.target.value = elementData.formattedValue;
|
||||||
}
|
}
|
||||||
event.target.setSelectionRange(0, 0);
|
// Reset the cursor position to the start of the field (issue 12359).
|
||||||
|
event.target.scrollLeft = 0;
|
||||||
elementData.beforeInputSelectionRange = null;
|
elementData.beforeInputSelectionRange = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user