From 0076eb4ed459f4f147e28b209060cf34c0bd0f4b Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 6 Jun 2024 20:05:24 -0400 Subject: [PATCH] Fix autocomplete again/more. #65 --- apps/ssb.json | 2 +- apps/ssb/tribute.esm.js | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index a815b150..4f26e3d9 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🐌", - "previous": "&RGDjjNsX3jYJFpOcDyI+LH2qmscuY0q8gP4dyJjOtww=.sha256" + "previous": "&Tqgx33F75cRAv5Cb0HsRPmc+HabRA8qnTjgMPr1PJ9Q=.sha256" } diff --git a/apps/ssb/tribute.esm.js b/apps/ssb/tribute.esm.js index 321d7a24..6ef061f8 100644 --- a/apps/ssb/tribute.esm.js +++ b/apps/ssb/tribute.esm.js @@ -482,16 +482,7 @@ class TributeRange { } getDocument() { - let iframe; - if (this.tribute.current.collection[0].iframe) { - iframe = this.tribute.current.collection[0].iframe; - } - - if (!iframe) { - return document - } - - return iframe.contentWindow.document + return document; } positionMenuAtCaret(scrollTo) { @@ -653,7 +644,7 @@ class TributeRange { } getWindowSelection() { - if (this.tribute.collection[0].iframe) { + if (this.tribute.collection[0].iframe?.getSelection) { return this.tribute.collection[0].iframe.getSelection() }