aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/float-main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-28 17:41:59 -0500
committerGitHub <noreply@github.com>2020-12-28 17:41:59 -0500
commitb6038c87b66630b341e431a4722856c9a3a282ed (patch)
tree721c26ef99b1e953904c10060c2a1bace281335e /ext/fg/js/float-main.js
parentc03340c4aa77c0a84b28bf18407aa79972697213 (diff)
Improve document focus control (#1167)
* Improve styles for #content-scroll-focus * Create new class to manage and control document focus * Use new focus class * Add a check to prevent redundant .blur calls
Diffstat (limited to 'ext/fg/js/float-main.js')
-rw-r--r--ext/fg/js/float-main.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fg/js/float-main.js b/ext/fg/js/float-main.js
index a8554867..aee736a2 100644
--- a/ext/fg/js/float-main.js
+++ b/ext/fg/js/float-main.js
@@ -17,17 +17,21 @@
/* global
* Display
+ * DocumentFocusController
* JapaneseUtil
* api
*/
(async () => {
try {
+ const documentFocusController = new DocumentFocusController();
+ documentFocusController.prepare();
+
api.forwardLogsToBackend();
await yomichan.backendReady();
const japaneseUtil = new JapaneseUtil(null);
- const display = new Display('popup', japaneseUtil);
+ const display = new Display('popup', japaneseUtil, documentFocusController);
await display.prepare();
display.initializeState();