# STEPS TO REPRODUCE 1. inspect any page 2. add CSS `color: transparent` 3. click the color swatch to show the color picker # EXPECTED the alpha slider would be at the bottom and the alpha input would say `0` # ACTUAL the alpha slider is at the top and the alpha input says `0`
<rdar://problem/80557438>
Reduction: data:text/html,<p%20style="color:transparent">color
Created attachment 433799 [details] Patch
Comment on attachment 433799 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433799&action=review > Source/WebInspectorUI/ChangeLog:11 > + When the initial value was set to 0, the `set value` was exiting early when the passed value was 0. Based on this, it seems like the real issue is that the initial value of `_knobY` is really the incorrect value? Changing to `NaN` seems a bit scary since there's no handling of `isNaN` anywhere in this file. Perhaps we just need to add a `recalculateKnobY` call inside the early return in `set value`?
This works as well.
Created attachment 433801 [details] Patch
Comment on attachment 433801 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433801&action=review > Source/WebInspectorUI/UserInterface/Views/Slider.js:61 > + this.recalculateKnobY(); We should only need to do this inside the `if (value === this._value)`. As you have it now, we'd call `set knobY` twice in the non-early-return path.
Created attachment 433804 [details] Patch
Comment on attachment 433804 [details] Patch r=me
Committed r280045 (239780@main): <https://commits.webkit.org/239780@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433804 [details].