Closed acdha closed 11 years ago
Hi Chris,
Are you sure this returns a "range" value across browsers? I thought a delve into outerHTML was necessary in order to catch the type="range" across browsers... let's hope I'm wrong
@freqdec I wasn't certain either but based on what I've read it appears that getAttribute
has consistently meant “As authored” for a long time.
I tossed together a simple test:
This works as far back as IE6:
http://www.webpagetest.org/result/130319_5X_PT3/1/screen_shot/
Here's another set of results in Chrome, Firefox, etc.: http://websitetest.com/ui/tests/5148676c8b5f0253c5000017
I do believe Sir that I owe you a few pints of Guinness. Very much appreciated.
Thanks - that can partially defray the pints I owe you for releasing this ;)
Hi having issues with this commit in firefox 19 + windows 7
throwing a type error on the "inp.getAttribute("type")" for inputs which don't have explicit type attributes set
think
inp.getAttribute("type").toLowerCase() == "range"
needs changed to
( inp.getAttribute("type") && inp.getAttribute("type").toLowerCase() == "range")
cheers
Ant
correction
-> (getAttribute(inp,"type") && getAttribute(inp,"type").toLowerCase() == "range")
Hi Anthony, I've just integrated your fix into the code. Many thanks indeed!
no probs, ps great wee shim
This avoids clobbering
<input type="number">
controls which also have min/max/step attributes.Tested as far back as IE8