Assigned
Status Update
Comments
sa...@chromium.org <sa...@chromium.org> #2
[Empty comment from Monorail migration]
[Monorail components: Blink>Scroll]
[Monorail components: Blink>Scroll]
sa...@chromium.org <sa...@chromium.org> #3
Able to reproduce the issue on reported chrome version #88.0.4324.150 using Mac 10.12, Linux 20.04 and Windows 10 by following steps as per https://crbug.com/chromium/1178622#c0.
Reproducible on
==============
90.0.4419.0 - Canary
90.0.4412.3 - Dev
89.0.4389.47-Beta
88.0.4324.150 - Stable
The same issue seems to be reproducible from M75 older versions, hence considering it as Non-Regression and marking it as Untriaged.
Thanks...!!
Reproducible on
==============
90.0.4419.0 - Canary
90.0.4412.3 - Dev
89.0.4389.47-Beta
88.0.4324.150 - Stable
The same issue seems to be reproducible from M75 older versions, hence considering it as Non-Regression and marking it as Untriaged.
Thanks...!!
ke...@chromium.org <ke...@chromium.org> #4
[Empty comment from Monorail migration]
gi...@chromium.org <gi...@chromium.org> #5
Works in firefox. Breaks in chrome:(
0x...@gmail.com <0x...@gmail.com> #6
[Empty comment from Monorail migration]
[Monorail components: Blink>Layout]
[Monorail components: Blink>Layout]
0x...@gmail.com <0x...@gmail.com> #7
[Empty comment from Monorail migration]
0x...@gmail.com <0x...@gmail.com> #8
+ It has scroll up issue when mouse text drag-selection.
fl...@chromium.org <fl...@chromium.org> #9
It looks like the reason this works in firefox is that firefox does not respect the scroll-padding when scrolling inputs you're typing into view:
https://codepen.io/flackr/pen/xxRodzY
I actually think that chrome is doing "the right thing" here to spec. We are trying to scroll the sticky element into view, however when we scroll up the sticky element moves up. With fixed position elements we never scroll them into view because scrolling will not shift them, however with sticky position elements there are cases where scrolling is necessary, see https://jsbin.com/decuxoc/edit?html,css,output
The problem is that sometimes (e.g. in this demo) the reason for the scroll padding is that the sticky element in question is obscuring the top, and we can't really know whether that is the case or not (i.e. it could be a sticky positioned element under a banner). If we naively fix https://crbug.com/chromium/664246 then this problem will go away as scrolling the input into view will scroll to its in flow position which doesn't change as you scroll.
I actually think that chrome is doing "the right thing" here to spec. We are trying to scroll the sticky element into view, however when we scroll up the sticky element moves up. With fixed position elements we never scroll them into view because scrolling will not shift them, however with sticky position elements there are cases where scrolling is necessary, see
The problem is that sometimes (e.g. in this demo) the reason for the scroll padding is that the sticky element in question is obscuring the top, and we can't really know whether that is the case or not (i.e. it could be a sticky positioned element under a banner). If we naively fix
fl...@chromium.org <fl...@chromium.org> #10
FYI I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1701928 for the firefox bug.
[Deleted User] <[Deleted User]> #11
I've run into this issue as well, with the (I expect) common use case of having an input inside a sticky header. Chromium browsers consider the header to be outside the scroll-padding-top-ed area and unnecessarily try to scroll to it whenever the input text changes.
Demo: https://codepen.io/burntcustard/pen/JjEZGyB
The workaround for me is going to be to swap the header from sticky to fixed, then have a margin-top of the same height as the header on the following element (probably <main>). It's awkward because it's a hardcoded value, but I'm already using the same hardcoded value for the scroll-padding-top anyway.
Here's a demo of my workaround (with an added <a> to check scroll-padding-top is working correctly too): https://codepen.io/burntcustard/pen/oNBybmO
Because my position: fixed version works, perhaps the same scroll-related chromium rules need to be applied to position: sticky elements?
Demo:
The workaround for me is going to be to swap the header from sticky to fixed, then have a margin-top of the same height as the header on the following element (probably <main>). It's awkward because it's a hardcoded value, but I'm already using the same hardcoded value for the scroll-padding-top anyway.
Here's a demo of my workaround (with an added <a> to check scroll-padding-top is working correctly too):
Because my position: fixed version works, perhaps the same scroll-related chromium rules need to be applied to position: sticky elements?
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #12
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/6388111d078ecdf3ab858b481ef01ac64dbc815f
commit 6388111d078ecdf3ab858b481ef01ac64dbc815f
Author: Seokho <0xdevssh@gmail.com>
Date: Tue May 04 07:00:37 2021
The sticky positioned element should reset the scroll to an unshifted 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}
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/renderer/core/layout/layout_inline.h
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/renderer/core/layout/layout_object.h
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/renderer/platform/runtime_enabled_features.json5
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/web_tests/TestExpectations
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/web_tests/external/wpt/css/css-position/sticky/position-sticky-input-box-gets-focused-after-scroll.html
[add] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/web_tests/external/wpt/css/css-position/sticky/sticky-after-input.html
[delete] https://crrev.com/ea35782e41ebb6d883b207a8efce862ad4c33de7/third_party/blink/web_tests/fast/css/sticky/sticky-focus-after-scroll.html
[modify] https://crrev.com/6388111d078ecdf3ab858b481ef01ac64dbc815f/third_party/blink/web_tests/fast/css/sticky/sticky-input-box-position.html
commit 6388111d078ecdf3ab858b481ef01ac64dbc815f
Author: Seokho <0xdevssh@gmail.com>
Date: Tue May 04 07:00:37 2021
The sticky positioned element should reset the scroll to an unshifted 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]
Bug: 664246, 1178622
Change-Id: I7b9e42d1274894a0f3282316a2eb69d0d10c5530
Reviewed-on:
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}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[delete]
[modify]
sa...@chromium.org <sa...@chromium.org> #13
Tried verifying the fix on latest M92 using repro from https://crbug.com/chromium/1178622#c0 and observed scroll while typing the input box.
Seokho@ Could you please review the attached screencast and let us know if anything being missed here and help us in verifying the fix.
Thanks..
Seokho@ Could you please review the attached screencast and let us know if anything being missed here and help us in verifying the fix.
Thanks..
0x...@gmail.com <0x...@gmail.com> #14
Oh, I see. I guess M92 does not yet contain the patch [1] about this issue.
But the current expectation of this issue is a bit different from the issue reporter's.
According to the spec [2], the sticky positioned element should be initial position with any operation which back to the unshifted position.
And this issue is now tracked with the feature flag 'CSSPositionStickyStaticScrollPosition' which status is 'experimental' (But I guess this flag is not filed yet in Chrome Platform Status) .
So I guess when It becomes 'stable' we could check the issue resolved as above.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/2727895
[2] https://www.w3.org/TR/css-position-3/#stickypos-scroll
But the current expectation of this issue is a bit different from the issue reporter's.
According to the spec [2], the sticky positioned element should be initial position with any operation which back to the unshifted position.
And this issue is now tracked with the feature flag 'CSSPositionStickyStaticScrollPosition' which status is 'experimental' (But I guess this flag is not filed yet in Chrome Platform Status) .
So I guess when It becomes 'stable' we could check the issue resolved as above.
[1]
[2]
0x...@gmail.com <0x...@gmail.com> #15
[Empty comment from Monorail migration]
ry...@gmail.com <ry...@gmail.com> #16
It looks like this bug has gotten worse recently - Version 98.0.4758.82 (Official Build) (64-bit)
Not only does typing in an input box trigger this issue, but focusing on a select element (both by tabbing or clicking). Tabbing to an input element triggers it, but strangely not clicking into an input element.
Not only does typing in an input box trigger this issue, but focusing on a select element (both by tabbing or clicking). Tabbing to an input element triggers it, but strangely not clicking into an input element.
fl...@chromium.org <fl...@chromium.org> #17
[Empty comment from Monorail migration]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #18
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/7f1e3f5ea871baa715c549a55e78f43327e46e9b
commit 7f1e3f5ea871baa715c549a55e78f43327e46e9b
Author: Robert Flack <flackr@chromium.org>
Date: Fri Oct 21 16:13:28 2022
Switch CSSPositionStickyStaticScrollPosition to test status
The spec change to scroll sticky position elements to their non-shifted
position is causing surprising breaking behavior on existing content.
Let's move this feature to test status until we resolve the working
group issue.
Bug: 1178622, 1334207
Change-Id: I04e6895b8040c331385302f18fc3200c504fef03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3968543
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1062168}
[modify] https://crrev.com/7f1e3f5ea871baa715c549a55e78f43327e46e9b/third_party/blink/renderer/platform/runtime_enabled_features.json5
commit 7f1e3f5ea871baa715c549a55e78f43327e46e9b
Author: Robert Flack <flackr@chromium.org>
Date: Fri Oct 21 16:13:28 2022
Switch CSSPositionStickyStaticScrollPosition to test status
The spec change to scroll sticky position elements to their non-shifted
position is causing surprising breaking behavior on existing content.
Let's move this feature to test status until we resolve the working
group issue.
Bug: 1178622, 1334207
Change-Id: I04e6895b8040c331385302f18fc3200c504fef03
Reviewed-on:
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1062168}
[modify]
ha...@google.com <ha...@google.com> #19
[Empty comment from Monorail migration]
fl...@chromium.org <fl...@chromium.org> #20
FYI I've filed https://github.com/w3c/csswg-drafts/issues/7931 to try to allow developers to better express which elements should be affected by scroll-padding such that they could only apply it to elements known to go under the sticky position content.
is...@google.com <is...@google.com> #21
This issue was migrated from crbug.com/chromium/1178622?no_tracker_redirect=1
[Multiple monorail components: Blink>Layout, Blink>Scroll]
[Monorail mergedwith: crbug.com/chromium/1172639]
[Monorail components added to Component Tags custom field.]
[Multiple monorail components: Blink>Layout, Blink>Scroll]
[Monorail mergedwith:
[Monorail components added to Component Tags custom field.]
ch...@google.com <ch...@google.com> #22
The Found In field may only contain full version values (e.g., 109.0.9878.12). Some values couldn't be corrected but were removed, please verify that any important data wasn't lost. You can see the changes by toggling full history on the issue.
Description
Chrome Version : 88.0.4324.150
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari: OK
Firefox: OK
Edge: Fail 88.0.705.68
What steps will reproduce the problem?
(1) open the a.html in attach
(2) scroll to the bottom of the div
(3) type any thin in the input box
What is the expected result?
no scroll
What happens instead?
the div scroll automatic
Please provide any additional information below. Attach a screenshot if
possible.
See #comment9 for an explanation of the underlying issue. TLDR we try to scroll the sticky element into the optimal viewing region but then because it is stuck the element does not visually shift so the user just sees the scroller scroll.
See also related spec proposal to make it easier to author sites that declare whether their sticky content should be part of the scroll padding or not: https://github.com/w3c/csswg-drafts/issues/7931