(In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #35) > (In reply to Botond Ballo [:botond] from comment #33) > > Another thought: I don't really want to encourage web developers to use the > > Visual Viewport API to emulate position:device-fixed, for a couple of > > reasons... > > This makes sense; I'd love your help to work on a decent example. Hi Chris! I wanted to follow up on this as the Visual Viewport API is shipping (on Android) in 68 (see bug 1512813). We had a [discussion](https://github.com/WICG/visual-viewport/issues/60) about `position: device-fixed` being the leading example of the Visual Viewport API, and it looks like David from the Chromium team (and who authored the API) agrees that it's not a great example, just the most obvious one to illustrate the API. Given that, here is a proposal for how we could proceed: * Turn the "Hide on zoom" example from the [spec README](https://github.com/WICG/visual-viewport) into a second MDN example. * Keep the `position: device-fixed` MDN example, but add a footnote mentioning that emulating `position: device-fixed` in this way is not recommended as it can result in the fixed element flickering during scrolling.
Bug 1357785 Comment 36 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #35) > (In reply to Botond Ballo [:botond] from comment #33) > > Another thought: I don't really want to encourage web developers to use the > > Visual Viewport API to emulate position:device-fixed, for a couple of > > reasons... > > This makes sense; I'd love your help to work on a decent example. Hi Chris! I wanted to follow up on this as the Visual Viewport API is shipping (on Android) in 68 (see bug 1512813). We had a [discussion](https://github.com/WICG/visual-viewport/issues/60) about `position: device-fixed` being the leading example of the Visual Viewport API, and it looks like David from the Chromium team (and who authored the API) agrees that it's not a great example, just the most obvious one to illustrate the API. Given that, here is a proposal for how we could proceed: * Turn the "Hide on zoom" example from the [spec README](https://github.com/WICG/visual-viewport) into a second MDN example. * Keep the `position: device-fixed` MDN example, but add a footnote mentioning that emulating `position: device-fixed` in this way is not recommended as it can result in the fixed element flickering during scrolling. How does that sound to you?
(In reply to Chris Mills (Mozilla, MDN editor) [:cmills] from comment #35) > (In reply to Botond Ballo [:botond] from comment #33) > > Another thought: I don't really want to encourage web developers to use the > > Visual Viewport API to emulate position:device-fixed, for a couple of > > reasons... > > This makes sense; I'd love your help to work on a decent example. Hi Chris! I wanted to follow up on this as the Visual Viewport API is shipping (on Android) in 68 (see bug 1512813). We had a [discussion](https://github.com/WICG/visual-viewport/issues/60) about `position: device-fixed` being the leading example of the Visual Viewport API, and it looks like David from the Chromium team (and who authored the API) agrees that it's not a great example, just the most obvious one to illustrate the API. Given that, here is a proposal for how we could proceed: * Turn the "Hide on zoom" example from the [spec README](https://github.com/WICG/visual-viewport) into a second MDN example. * Keep the `position: device-fixed` MDN example, but add a footnote mentioning that emulating `position: device-fixed` in this way is not recommended as it can result in the fixed element flickering during scrolling. How does that sound?