Fossil SCM

/chat: a long-shot potential workaround for the weird intermittent bug where the Pale Moon browser gives focus to the preview (non-)button instead of the input field. Worst case, it behaves the same as it does now.

stephan 2021-10-09 04:12 trunk
Commit e3e62a0d3de314680b227c0b5965ddc759184a17ca4551b00de9c54e906f3b39
1 file changed +1 -1
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -788,11 +788,11 @@
788788
the Preview button. The down-side of this is that it will
789789
deselect any text which was previously selected on this
790790
page. This also, unfortunately, places the focus at the
791791
start of the element, rather than the last cursor position
792792
(like a textarea would). */
793
- cs.inputFocus();
793
+ setTimeout(()=>cs.inputFocus(), 0);
794794
}
795795
}
796796
}, true);
797797
cs.setCurrentView(cs.e.viewMessages);
798798
799799
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -788,11 +788,11 @@
788 the Preview button. The down-side of this is that it will
789 deselect any text which was previously selected on this
790 page. This also, unfortunately, places the focus at the
791 start of the element, rather than the last cursor position
792 (like a textarea would). */
793 cs.inputFocus();
794 }
795 }
796 }, true);
797 cs.setCurrentView(cs.e.viewMessages);
798
799
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -788,11 +788,11 @@
788 the Preview button. The down-side of this is that it will
789 deselect any text which was previously selected on this
790 page. This also, unfortunately, places the focus at the
791 start of the element, rather than the last cursor position
792 (like a textarea would). */
793 setTimeout(()=>cs.inputFocus(), 0);
794 }
795 }
796 }, true);
797 cs.setCurrentView(cs.e.viewMessages);
798
799

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button