Debug help — my plugin is breaking the Select-to-Reply-with-Quote feature

Hoping someone can help me narrow down this issue — I created a plugin but it inadvertently disables the “quote selected text” popup & keyboard shortcut.

When the plugin is enabled, selecting text in a post no longer shows the “quote reply for highlighted text” feature — such that the PostTextSelectionToolbar popup doesn’t appear, pressing q doesn’t work, and clicking the Reply button starts a reply but not including the quote of selected text.

My hunch is that it’s related to how I’m loading third-party JS dependencies? I’m using the JavaScript loadScript from discourse/lib/load-script to load tippy and its dependency Popper from unpkg.com… Is there a better way to selectively load JS assets? (Or am I better off just including those assets on e.g. all topic pages and not trying to selectively load them?)

Here are my notes about about this bug. Any & all help is greatly appreciated!