kiosk-virtual-keyboard
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "kiosk-virtual-keyboard", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "An electron based virtual keyboard. Uses electron's sendInputEvent api to implement a simple customizable soft keyboard.", | ||
@@ -5,0 +5,0 @@ "author": "Austin Ames", |
@@ -188,3 +188,5 @@ const DEFAULT_LANGUAGE = 'en' | ||
document.addEventListener('focusin', (event) => { | ||
if (event.target?.className.includes('virtual-keyboard-input') && !event.target?.className.includes('virtual-keyboard-disabled')) { | ||
const kioskClassList = (event.target?.attributes['kiosk-class']?.value ?? '').split(' ') ?? [] | ||
if (kioskClassList.includes('virtual-keyboard-input') && !kioskClassList.includes('virtual-keyboard-disabled')) { | ||
this.previouslyFocusedElement = event.target; | ||
@@ -201,4 +203,5 @@ | ||
const focusedElement = event.relatedTarget || document.activeElement; | ||
const kioskClassList = (focusedElement?.attributes['kiosk-class']?.value ?? '').split(' ') ?? [] | ||
if (focusedElement && !focusedElement?.className.includes('virtual-keyboard-input')) { | ||
if (focusedElement && !kioskClassList.includes('virtual-keyboard-input')) { | ||
// Blur the input to hide the keyboard | ||
@@ -205,0 +208,0 @@ this.hideKeyboard() |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40644
1029