Fix tool options bar number inputs not being applied before starting a drag with the tool (#1646)

Unfocus elements before control is passed to tool
This commit is contained in:
Tanmay Kumar 2024-03-04 03:48:48 +05:30 committed by GitHub
parent 9479abe114
commit 15ffdf73ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,6 +165,9 @@
const onEditbox = e.target instanceof HTMLDivElement && e.target.contentEditable;
if (!onEditbox) viewport?.setPointerCapture(e.pointerId);
if (window.document.activeElement instanceof HTMLElement) {
window.document.activeElement.blur();
}
}
// Update rendered SVGs