Open cblanken opened 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?
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!!
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 asallow-same-origin
andallow-scripts
.In particular the following dictionaries mentioned in issue https://github.com/LuteOrg/lute-v3/issues/469 require these policies to load correctly: