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.
Commit
e3e62a0d3de314680b227c0b5965ddc759184a17ca4551b00de9c54e906f3b39
Parent
62572ab606345d9…
1 file changed
+1
-1
+1
-1
| --- src/fossil.page.chat.js | ||
| +++ src/fossil.page.chat.js | ||
| @@ -788,11 +788,11 @@ | ||
| 788 | 788 | the Preview button. The down-side of this is that it will |
| 789 | 789 | deselect any text which was previously selected on this |
| 790 | 790 | page. This also, unfortunately, places the focus at the |
| 791 | 791 | start of the element, rather than the last cursor position |
| 792 | 792 | (like a textarea would). */ |
| 793 | - cs.inputFocus(); | |
| 793 | + setTimeout(()=>cs.inputFocus(), 0); | |
| 794 | 794 | } |
| 795 | 795 | } |
| 796 | 796 | }, true); |
| 797 | 797 | cs.setCurrentView(cs.e.viewMessages); |
| 798 | 798 | |
| 799 | 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 | 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 |