[w3c/editing] `document.execCommand()` should do nothing when the document is invisible (#193)

When we're investigating [Mozilla's crash bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1558412), I found a incompatible issue between browsers. When web apps does `execCommand("insertText", false, "foo")` in invisible `<iframe>`, Firefox and Chrome do nothing. However, Safari and Edge oddly they accept `execCommand` **and** inputs from user into the hidden document.

testcase: https://jsfiddle.net/d_toybox/edzpr9h3/9/

I think that browsers shouldn't accept any input including `execCommand()` in invisible document since it might try to steal user input. I.e., I think that the behavior of Firefox and Chrome is better.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/193

Received on Wednesday, 12 June 2019 06:26:22 UTC