Iframe blocking hotkey input and butchering my usual Anki flow

Hello friends,

my usage of iframe within some of my eng-ger anki deck is currently giving me headaches because whenever I review a card, the searchbar of the linguee.de iframe will be active. Due to that, the usual anki flow of pressing enter or 1 to 4 is blocked, because 1 to 4 will be written into the websites searchbar and enter will only activate the search inside the linguee iframe.
So I am looking for ways to put the tab-key/focus back out of the iframe and onto my “Good” button.

Hope someone here will be able to help me :slight_smile:


this is how it will look on my cards.
You can see how the searchbar is active.

This is what happens when i press 1234.

Try the following:

<iframe src="https://..." sandbox></iframe>

This will result in disabling the search button in the iframe. If you want to be able to click somewhere in the iframe to focus and perform another search by clicking the search button, try the following instead:

<iframe src="https://..." sandbox="allow-forms"></iframe>

For more details about sandbox attribute of <iframe> tag, see here: <iframe>: The Inline Frame element - HTML: HyperText Markup Language | MDN

3 Likes

This is providing the exact functionality I was hoping to achieve … thanks so much. <3