mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2026-04-30 00:00:04 +08:00
Added isTouchDevice and touch device helper methods
This commit is contained in:
@@ -365,6 +365,12 @@ class Utilities {
|
||||
return Boolean(this.maxLengthReached);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether a touch device is being used
|
||||
*/
|
||||
isTouchDevice(){
|
||||
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind all methods in a given class
|
||||
|
||||
Reference in New Issue
Block a user