LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading.
https://luteorg.github.io/lute-manual/
MIT License
491 stars 46 forks source link

Revert dict tab focus fix and sandbox dict tab iframes #473

Open cblanken opened 3 months ago

cblanken commented 3 months ago

One possible solution to prevent dictionary iframes from stealing focus is to enable the CSP sandbox on each iframe. If a bare sandbox attribute is used, then autofocus from iframes should be blocked. Unfortunately this has the side effect of blocking some online dictionary that require additional feature policies such as allow-same-origin and allow-scripts.

In particular the following dictionaries mentioned in issue https://github.com/LuteOrg/lute-v3/issues/469 require these policies to load correctly:

jzohrab commented 3 months ago

Hi @cblanken - I wonder if this should be split out further, with one PR just to revert the existing change, and another to add the sandbox etc attributes in that new line. I wouldn't want to "fix" one problem just to cause another. Then we could look at the extra policy stuff more carefully. Thoughts?

jzohrab commented 3 months ago

Chatted briefly w/ @cblanken on discord, this is a draft idea to investigate sandboxing only. I'll revert the old PR, will keep this as an idea only for sandboxing investigations. Thanks!!