Skip to content

Commit

Permalink
Only pay attention to focusout of math-elements in order to allow the…
Browse files Browse the repository at this point in the history
… 'manual' focusout policy added in issue #1914 to be respected. (#2239)

Co-authored-by: Dan Bradley <WasteEnemy@gmail.com>
  • Loading branch information
dcbradley and Dan Bradley authored Jan 1, 2024
1 parent 2eb1467 commit 2dc718b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/virtual-keyboard/virtual-keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ export class VirtualKeyboard implements VirtualKeyboardInterface, EventTarget {
});

document.addEventListener('focusout', (evt) => {
if ((evt.target as HTMLElement)?.tagName?.toLowerCase() !== 'math-field') return;
const target = evt.target as MathfieldElement;
if (target.mathVirtualKeyboardPolicy !== 'manual') {
// If after a short delay the active element is no longer
Expand Down

0 comments on commit 2dc718b

Please sign in to comment.