Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sticky positioned element should reset the scroll to an unshifted position by any operation #28098

Merged
merged 1 commit into from May 4, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 16, 2021

When the sticky element takes the operation, it keeps the sticky offset to move its position.

However, According to the specification [1], the scroll position should be reset by any operation to that element.

Therefore, pass kIgnoreStickyOffset to AbsoluteToLocalRect() for removing sticky-position offset which is 'unshifted-position'.

[1] https://www.w3.org/TR/css-position-3/#stickypos-scroll

Bug: 664246, 1178622
Change-Id: I7b9e42d1274894a0f3282316a2eb69d0d10c5530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727895
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Seokho Song <0xdevssh@gmail.com>
Cr-Commit-Position: refs/heads/master@{#878763}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title The sticky positioned input element in the scrollable should block scroll The sticky positioned input element in the scrollable should skip the area Mar 16, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title The sticky positioned input element in the scrollable should skip the area The sticky positioned input element in the scrollable should ignore the scroll-padding Mar 26, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch 2 times, most recently from ed9cce3 to 0950d2b Compare April 19, 2021 04:07
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch 2 times, most recently from 45eac9f to ebd8009 Compare April 23, 2021 01:05
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title The sticky positioned input element in the scrollable should ignore the scroll-padding The sticky positioned element should reset the scroll to an unshifted position by any operation Apr 23, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2727895 branch 5 times, most recently from 7e0d5e1 to c952b8f Compare April 29, 2021 14:42
… position by any operation

When the sticky element takes the operation, it keeps the sticky offset to move its position.

However, According to the specification [1], the scroll position should be reset by any operation to that element.

Therefore, pass kIgnoreStickyOffset to AbsoluteToLocalRect() for removing sticky-position offset which is 'unshifted-position'.

[1] https://www.w3.org/TR/css-position-3/#stickypos-scroll

Bug: 664246, 1178622
Change-Id: I7b9e42d1274894a0f3282316a2eb69d0d10c5530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2727895
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Seokho Song <0xdevssh@gmail.com>
Cr-Commit-Position: refs/heads/master@{#878763}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants