Skip to content

[css-viewport] zoom and scroll propagation to the viewport. #9911

@emilio

Description

@emilio

When document.scrollingElement == document.body (so, in quirks mode when the <body> is propagated to the viewport), things like document.body.scrollTop return the viewport scroll position etc.

The question then becomes, with something like:

<!quirks-mode>
<body style="zoom: 2">
  <div style="height: 3000px"></div>
  <script>
  onload = () => {
    document.body.scrollTop;
    document.body.scrollTop = 500;
  };
  </script>
</body>

Should those coordinates be unscaled by the <body> zoom or not?

I think Chrome's behavior is not unzooming them, which makes sense to me.

cc @chrishtr @smfr

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions