mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Add null checking
for document.activeElement
Detail is at https://github.com/dataarts/dat.gui/issues/159
This commit is contained in:
parent
2659494a80
commit
af88f4c712
@ -468,7 +468,7 @@ GUI.TEXT_CLOSED = 'Close Controls';
|
||||
GUI.TEXT_OPEN = 'Open Controls';
|
||||
|
||||
GUI._keydownHandler = function(e) {
|
||||
if (document.activeElement.type !== 'text' &&
|
||||
if (document.activeElement && document.activeElement.type !== 'text' &&
|
||||
(e.which === HIDE_KEY_CODE || e.keyCode === HIDE_KEY_CODE)) {
|
||||
GUI.toggleHide();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user