- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 13 Feb 2024 23:51:46 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[cssom-view] Consider adding a programmatic way of resetting the visual viewport scale.`, and agreed to the following: * `RESOLVED: Add VisualViewport.prototype.resetScale()` <details><summary>The full IRC log of that discussion</summary> <fantasai> emilio: There's a use-case someone came up with, you have a form, the browser will zoom into that form element as needed for mobile<br> <fantasai> emilio: that's a modal dialog, and after they're done, the browser ends up in a zoom state<br> <fantasai> emilio: but if they're in a map that has pinch gestures etc, they hvae to reset the browser zoom to see the whole map<br> <fantasai> emilio: they do this by calling querySelector to get the meta viewport and then changing its content value to be like initial-scale=1/minimum-scale=1/max-scale=1<br> <fantasai> emilio: someone filed a bug that it wasn't synchronous in Firefox<br> <TabAtkins> q+<br> <fantasai> emilio: it seems there's some concern about providing a setter to viewport scale, but maybe a function that resets the scale to 1 would be a good idea?<br> <fantasai> emilio: use case seems reasonable<br> <fantasai> emilio: main concern from smfr and David Bokand &co was making it very easy to misuse, to misbehave<br> <fantasai> emilio: but if we just provide a resetScale() method that seems reasonable?<br> <dbaron> s/Bokand/Bokan/<br> <Rossen_> ack TabAtkins<br> <fantasai> TabAtkins: Given you can do this already in mobile, and it's bad when setting min-scale/max-scale which doesn't let me zoom at all<br> <fantasai> TabAtkins: I think this is reasonable<br> <fantasai> TabAtkins: ok if it's somewhat async<br> <fantasai> TabAtkins: Being able to hard-set it, you can already do it with meta-viewport<br> <fantasai> TabAtkins: I lean towards doing reset to initial<br> <fantasai> TabAtkins: that has a clear use case, seems OK<br> <bramus> +1<br> <fantasai> dholbert: question about whether this affects desktop<br> <fantasai> emilio: I would lean towards yes for consistency, but if browsers misbehave we could limit it to mobile<br> <TabAtkins> (Important to note: I hate it when sites prevent me from zooming. But they can already do it, so eh, and the "reset to initial" has a reasonable use-case.)<br> <fantasai> TabAtkins: I wouldn't mind if the browser detected multiple resets and popped up a dialog asking if you want the page to be allowed to continue doing so<br> <fantasai> TabAtkins: but that's quality of implementation<br> <fantasai> emilio: would rest to your meta-viewport settings<br> <fantasai> s/rest/reset/<br> <emilio> PROPOSED: Add VisualViewport.prototype.resetScale()<br> <fantasai> fantasai: Are you sure it's not resetZoom()? :)<br> <fantasai> emilio: no the ?? property is scale<br> <fantasai> RESOLVED: Add VisualViewport.prototype.resetScale()<br> <fantasai> <br duration=17min><br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9787#issuecomment-1942867980 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 13 February 2024 23:51:48 UTC