mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2026-04-30 00:00:04 +08:00
Address handleButtonMouseDown TypeError. Fixes #844
This commit is contained in:
@@ -333,17 +333,19 @@ class SimpleKeyboard {
|
|||||||
*/
|
*/
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
handleButtonMouseDown(button, e) {
|
handleButtonMouseDown(button, e) {
|
||||||
/**
|
if(e){
|
||||||
* Handle event options
|
/**
|
||||||
*/
|
* Handle event options
|
||||||
if (this.options.preventMouseDownDefault) e.preventDefault();
|
*/
|
||||||
if (this.options.stopMouseDownPropagation) e.stopPropagation();
|
if (this.options.preventMouseDownDefault) e.preventDefault();
|
||||||
|
if (this.options.stopMouseDownPropagation) e.stopPropagation();
|
||||||
/**
|
|
||||||
* Add active class
|
|
||||||
*/
|
|
||||||
if (e) e.target.classList.add(this.activeButtonClass);
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add active class
|
||||||
|
*/
|
||||||
|
e.target.classList.add(this.activeButtonClass);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);
|
if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);
|
||||||
if (this.holdTimeout) clearTimeout(this.holdTimeout);
|
if (this.holdTimeout) clearTimeout(this.holdTimeout);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user