ensure default can be prevented

This commit is contained in:
Hakim El Hattab 2014-05-04 09:32:10 +02:00
parent 4c5b15d0b9
commit 5e85f02eb1

View file

@ -3278,7 +3278,7 @@
// If the input resulted in a triggered action we should prevent // If the input resulted in a triggered action we should prevent
// the browsers default behavior // the browsers default behavior
if( triggered ) { if( triggered ) {
event.preventDefault(); event.preventDefault && event.preventDefault();
} }
// ESC or O key // ESC or O key
else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) { else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) {
@ -3289,7 +3289,7 @@
toggleOverview(); toggleOverview();
} }
event.preventDefault(); event.preventDefault && event.preventDefault();
} }
// If auto-sliding is enabled we need to cue up // If auto-sliding is enabled we need to cue up