rust/tests/rustdoc-gui/sidebar-mobile-scroll.goml
Michael Howell bb7ed64f45 rustdoc: use CSS overscroll-behavior instead of JavaScript
Fixes the desktop scrolling weirdness mentioned in
https://github.com/rust-lang/rust/pull/98775#issuecomment-1182575603

As described in the MDN page for this property:

* The current Firefox ESR is 102, and the first Firefox version
  to support this feature is 59.
* The current Chrome version 112, and the first version to support
  this is 63.
* Edge is described as having a minor bug in `none` mode, but we
  use `contain` mode anyway, so it doesn't matter.
* Safari 16, released September 2022, is the last browser to
  add this feature, and is also the oldest version we officially
  support.
2023-04-12 10:31:06 -07:00

13 lines
589 B
Plaintext

// This test ensures that the mobile disables scrolling the page.
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
set-window-size: (1280, 800) // desktop
assert-css: (".sidebar", {"overscroll-behavior": "contain"})
set-window-size: (700, 600) // mobile
assert-css: (".sidebar", {"overscroll-behavior": "contain"})
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
set-window-size: (1280, 800) // desktop
assert-css: (".sidebar", {"overscroll-behavior": "contain"})
set-window-size: (700, 600) // mobile
assert-css: (".sidebar", {"overscroll-behavior": "contain"})