Using select2 with tags causes unresponsive script webextension-popup

Hello,

I’m using the jQuery select2 plugin for tags in a webextension popup. When the autocomplete pops up the script becomes unresponsive.
I hope that someone can help me. Thanks!

Here’s a git sample repo: https://github.com/alebx/webext-unresposive-select2-tags

Some screenshots:

Firefox 55.0.3 (64-bit) on macOS 10.12.6

I installed your extension in FF56 and the extension process powers a CPU code 100% and it’s memory consumption keeps growing. I did not get any “unresponsive script” popups. I had to kill the extension process at ~18GB after about 10 minutes.

While it didn’t happen when the same document was opened in a tab, setting a fixed height to the panel didn’t help.