fixed #71 : input autofocus on touch devices
This commit is contained in:
parent
0bce6c6a46
commit
18bd9d62cb
2 changed files with 3 additions and 0 deletions
|
@ -134,6 +134,7 @@ function ChannelViewInput({
|
|||
}
|
||||
|
||||
function focusInput() {
|
||||
if (settings.isTouchScreenDevice) return;
|
||||
textAreaRef.current.focus();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ class Settings extends EventEmitter {
|
|||
this.themeIndex = this.getThemeIndex();
|
||||
|
||||
this.isMarkdown = this.getIsMarkdown();
|
||||
|
||||
this.isTouchScreenDevice = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0);
|
||||
}
|
||||
|
||||
getThemeIndex() {
|
||||
|
|
Loading…
Reference in a new issue