Re: [whatwg/fullscreen] Remove nodes from top layer as part of the removing steps (#102)

upsuper commented on this pull request.



>  
  <li><p>Let <var>exitDocs</var> be the result of
  <a lt="collect documents to unfullscreen">collecting documents to unfullscreen</a> given
- <var>doc</var>.
+ <var>pendingDoc</var>.

If we "terminate these steps" when `pending` is different than `pendingDoc`'s fullscreen element, there would be a weird case:

If we have top-level document A being: `<div id="outer"><iframe></iframe></div>`, then the `iframe` contains document B. Now we fullscreen `#outer` in A, then fullscreen `document.body` in B. When we remove `document.body` from B, it seems that the `iframe` in A would keep being in fullscreen.

However, if we don't fullscreen `#outer` at the beginning, removing `document.body` from B would trigger a full unfullscreen, and the event would be solely dispatched to A rather than B.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/102#discussion_r165263396

Received on Thursday, 1 February 2018 05:33:39 UTC