mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-16 07:13:12 -06:00
Prevent input focus from scrolling
Remove focus from input to prevent scrolling behavior.
This commit is contained in:
parent
d7f87ce0bd
commit
a88687a11b
|
|
@ -38,7 +38,6 @@ export function openTypeToConfirmModal(opts = {}) {
|
||||||
const input = overlay.querySelector('#ttcInput');
|
const input = overlay.querySelector('#ttcInput');
|
||||||
const confirmBtn = overlay.querySelector('#ttcConfirm');
|
const confirmBtn = overlay.querySelector('#ttcConfirm');
|
||||||
const errorEl = overlay.querySelector('#ttcError');
|
const errorEl = overlay.querySelector('#ttcError');
|
||||||
input.focus({ preventScroll: true });
|
|
||||||
|
|
||||||
const matches = () => input.value.trim() === String(expected);
|
const matches = () => input.value.trim() === String(expected);
|
||||||
input.addEventListener('input', () => { confirmBtn.disabled = !matches(); });
|
input.addEventListener('input', () => { confirmBtn.disabled = !matches(); });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue