::-webkit-scrollbar No Longer Inherits Cursors and Always Uses "default"
Reported by
dra...@gmail.com,
Aug 21
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 Steps to reproduce the problem: Change the cursor of the parent where ::-webkit-scrollbar is used, or specifically set the cursor within ::-webkit-scrollbar. Test/sample case here: http://jsfiddle.net/Drath/fjnmp3qy/ What is the expected behavior? The cursor should be able to be changed and/or inherited from parent as before. What went wrong? The cursor in "-webkit-scrollbar"-based scrollbars always defaults to "default". Did this work before? Yes 61 Chrome version: 68.0.3440.106 Channel: stable OS Version: 10.0 Flash Version: This stopped working in Chrome 62. I rely on this functionality for a Chromium-based application. Attached is a sample image of it working within Chrome 61.
,
Aug 21
Able to reproduce the issue on reported version 68.0.3440.106 and latest chrome 70.0.3528.0 using Mac 10.12.6, Ubuntu 14.04 and Windows-10, hence providing Bisect Info Bisect Info: ================ Good build: 62.0.3174.0 Bad build: 62.0.3175.0 CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/b96f2cbbfd81ad1354f9b72b72630d94d1aa8383..650197826dc04baa5f11673f7471153267b64d03 Suspect: https://chromium.googlesource.com/chromium/src/+/650197826dc04baa5f11673f7471153267b64d03 from above change log Change-Id: I72f721deadde3da9329c43f9e216b2ac3db08e7e Reviewed-on: https://chromium-review.googlesource.com/598887 @chaopeng: Please confirm the issue and help in re-assigning if it is not related to your change. Thanks!
,
Aug 21
The CL is for following spec. > User agents may ignore the cursor property over native user-agent controls such as scrollbars, resizers. https://drafts.csswg.org/css-ui-3/#cursor webkit-scrollbar is non-standard. I just double check with Safari. They have same behavior. I am not sure we should support change cursor style by webkit scrollbar pseudo. +bokan & nzolghadr
,
Aug 21
Agree. This is an intentional change, matches the spec, and is interoperable with Safari so I don't think we want to change unilaterally.
,
Aug 21
Is webkit-scrollbar truly a "native user-agent control"? If you are following that spec, shouldn't the following also be true in Chromium: "User agents may also ignore the cursor property and display a cursor of their choice to indicate various states of the UA’s user interface, such as a busy cursor when the page is not responding, or a text cursor when the user is performing text selection."
,
Aug 21
Yes, there's definitely some grey area, particularly around custom scrollbars, in the spec. However, given they're non-standard, we're unlikely to invest any time into ::-webkit-scrollbar unless it's broken functionally. Given that this is very low severity and doesn't work outside Chrome/Safari at all - interop with Safari is a net positive.
,
Aug 21
Our use case is a game and we change every cursor to be like the native ones but in the style of the game. (We have usability in mind. See attached GIF for examples) The scrollbars are now the only place where custom cursors do not work, whereas they have worked for the entirety of the game's existence, the past 4 years or so. We use electron to package our game, and we need to update over time as bugs get fixed. We're at your mercy with breaking changes like this. The only thing we can do to fix this is implement our own scrollbars (which would be an insane amount of work and wouldn't be as efficient. Our game has a lot of UI, so that would probably cause issues down the line)
,
Aug 21
Ack, I forgot about electron. Ok - that makes this a more compelling use case, sorry about that. chaopeng@ - we should make an exception in the landed patch for custom scrollbars.
,
Aug 22
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dc221292ff296b826e6a97226bfb4e34160c964e commit dc221292ff296b826e6a97226bfb4e34160c964e Author: chaopeng <chaopeng@chromium.org> Date: Wed Aug 22 18:00:06 2018 Allow custom scrollbar cursor change by scroller style. Bug: 876180 Change-Id: If3a169518796f82cf3abc319dd05d7845a449c82 Reviewed-on: https://chromium-review.googlesource.com/1185232 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Jianpeng Chao <chaopeng@chromium.org> Cr-Commit-Position: refs/heads/master@{#585157} [modify] https://crrev.com/dc221292ff296b826e6a97226bfb4e34160c964e/third_party/blink/renderer/core/input/event_handler.cc [modify] https://crrev.com/dc221292ff296b826e6a97226bfb4e34160c964e/third_party/blink/renderer/core/layout/scrollbars_test.cc
,
Aug 30
This fix allow cursor changed by custom scrollbar's owner. But still not allow set cursor style by custom scrollbar pseudo. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by phanindra.mandapaka@chromium.org
, Aug 21