fixed #71 : input autofocus on touch devices

This commit is contained in:
unknown committed 2021-08-25 13:40:38 +05:30
1 parent 0bce6c6a46
commit 18bd9d62cb
2 files changed
+3

No files matched your search

@@ -134,6 +134,7 @@ function ChannelViewInput({
}
function focusInput() {
if (settings.isTouchScreenDevice) return;
textAreaRef.current.focus();
}
+2
View File
@@ -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() {