summaryrefslogtreecommitdiff
path: root/ext/js/display/display.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r--ext/js/display/display.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index ee2448d6..b17a6168 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -23,6 +23,7 @@
* DisplayHistory
* DisplayNotification
* DocumentUtil
+ * ElementOverflowController
* FrameEndpoint
* Frontend
* HotkeyHelpController
@@ -114,6 +115,7 @@ class Display extends EventDispatcher {
this._ankiNoteNotificationEventListeners = null;
this._queryPostProcessor = null;
this._optionToggleHotkeyHandler = new OptionToggleHotkeyHandler(this);
+ this._elementOverflowController = new ElementOverflowController();
this._hotkeyHandler.registerActions([
['close', () => { this._onHotkeyClose(); }],
@@ -305,6 +307,7 @@ class Display extends EventDispatcher {
this._hotkeyHelpController.setOptions(options);
this._displayGenerator.updateHotkeys();
this._hotkeyHelpController.setupNode(document.documentElement);
+ this._elementOverflowController.setOptions(options);
this._queryParser.setOptions({
selectedParser: options.parsing.selectedParser,
@@ -535,6 +538,7 @@ class Display extends EventDispatcher {
this._hideAnkiNoteErrors(false);
this._definitions = [];
this._definitionNodes = [];
+ this._elementOverflowController.clearElements();
// Prepare
const urlSearchParams = new URLSearchParams(location.search);
@@ -966,6 +970,8 @@ class Display extends EventDispatcher {
if (focusEntry === i) {
this._focusEntry(i, false);
}
+
+ this._elementOverflowController.addElements(entry);
}
if (typeof scrollX === 'number' || typeof scrollY === 'number') {