Skip to content

Commit 7ba3df8

Browse files
authored
Fix: Random errors in IE11 due to document.activeElement being an object (#29)
1 parent 0d4759c commit 7ba3df8

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/base.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
height: 100%;
1313
letter-spacing: .13px;
1414
margin: 0;
15-
min-width: 350px;
1615
outline: none;
1716
overflow: hidden;
1817
padding: 0;

src/util/dom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { CLASS_CHECKBOX_SPAN, CLASS_BUTTON_CONTENT_SPAN } from '../constants';
1414
* @return {boolean} true if its one of the above elements
1515
*/
1616
export function isInputElement(element: HTMLElement | null): boolean {
17-
if (!element) {
17+
if (!element || !(element instanceof HTMLElement)) {
1818
return false;
1919
}
2020
const tag = element.tagName.toLowerCase();
@@ -29,7 +29,7 @@ export function isInputElement(element: HTMLElement | null): boolean {
2929
* @return {boolean} true if its one of the above elements
3030
*/
3131
export function isFocusableElement(element: HTMLElement | null): boolean {
32-
if (!element) {
32+
if (!element || !(element instanceof HTMLElement)) {
3333
return false;
3434
}
3535
const tag = element.tagName.toLowerCase();

0 commit comments

Comments
 (0)