Skip to content

Commit

Permalink
part 3: Set an explicit whole-pixel-valued height on the textfield in…
Browse files Browse the repository at this point in the history
… text-input-vertical-overflow-no-scroll.html.

This avoids triggering bug 1851066, per the comment in the test.  Bug 1851066
is a real bug, but it's quite subtle and is unrelated to what this WPT is
actually trying to test.

Differential Revision: https://phabricator.services.mozilla.com/D187241

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1802466
gecko-commit: fecbf97cc8db1ad76076fa902abbdc791fec8bd1
gecko-reviewers: ntim
  • Loading branch information
dholbert authored and moz-wptsync-bot committed Sep 8, 2023
1 parent 17bd2fa commit 687603c
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@
.spacer {
height: 100vh;
}
input { font-family: monospace; }
input {
font-family: monospace;

/* Use an explicit whole-number-of-pixels height, to avoid tripping
Mozilla bug 1851066, regarding fractional scroll positions
triggering an async 1px adjustment to scrollTop. We can remove this
once that bug is fixed.
(Without this hack, the input element may end up with a height
that's a fractional number of pixels, depending on the font.
And then this test's call to 'scrollIntoView' puts us at a
fractional scroll-position, to bottom-align the input element. And
that's sufficient to trigger bug 1851066 and get an asynchronous 1px
adjustment to scrollTop, which this test doesn't expect.
*/
height: 200px;
}
</style>

<div class="spacer"></div>
Expand Down

0 comments on commit 687603c

Please sign in to comment.