Created attachment 256684 [details]
Screenshot of the rendering error
Original Bootstrap issue: https://github.com/twbs/bootstrap/issues/16809
Setting `display: block; width: 100%` on an <input type="range"> causes the left or right part of the "thumb" of the input to get clipped when the user moves the "thumb".
Test case: http://jsfiddle.net/cvrebert/0uzk6f4c/
Steps to reproduce:
1. Open http://jsfiddle.net/cvrebert/0uzk6f4c/ in OS X Safari
2. Click on the range input's "thumb" and keep the mouse button depressed
3. Move the mouse to the left or right sufficiently so that the "thumb" changes its position along the range input's "track"
4. With the mouse button still depressed, move the pointer downward so that you can see the entire "thumb" unobscured
The range input's "thumb" should be drawn normally.
(In Safari's current UI, it should be a white/gray circle.)
The range input's "thumb" has its left or right edge clipped off.
See attached screenshot.
Contents of the testcase (in the event that JS Fiddle goes offline):
<input type="range" />
(This is using Safari Version 8.0.7 (10600.7.12).)
Filed a Radar for this:
This bug also affects iOS 8.4.
Seems that any range slider over about 400px wide causes thumb clipping. The wider it is, the more the clipping.
RenderSliderContainer::layout() repositions the thumb box but does not issue repaint. Default display: inline works due to inline painting (see RenderBlockFlow::layoutBlock())
we just need to issue a repaint for the thumb after we repositioned it.
diff --git a/Source/WebCore/html/shadow/SliderThumbElement.cpp b/Source/WebCore/html/shadow/SliderThumbElement.cpp
index 4bd22cc..0a1bb83 100644
@@ -190,6 +190,7 @@ void RenderSliderContainer::layout()
thumbLocation.setX(thumbLocation.x() - offset);
Created attachment 256983 [details]
Comment on attachment 256983 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=256983&action=review
> + `display: block; width: 100%` makes <input type="range">'s thumb get clipped
Created attachment 256984 [details]
Comment on attachment 256984 [details]
Clearing flags on attachment: 256984
Committed r186981: <http://trac.webkit.org/changeset/186981>
All reviewed patches have been landed. Closing bug.
Thanks for the fix! I will remove the corresponding entry from http://getbootstrap.com/browser-bugs shortly.
(In reply to comment #12)
> Thanks for the fix! I will remove the corresponding entry from
> http://getbootstrap.com/browser-bugs shortly.
Thanks for filing the bug!
(In reply to comment #13)
> (In reply to comment #12)
> > Thanks for the fix! I will remove the corresponding entry from
> > http://getbootstrap.com/browser-bugs shortly.
> Thanks for filing the bug!
Tried to fix flaky test in r186994: <http://trac.webkit.org/r186994>