Summary: | Attributes of <input type=range> not accessable from javascript | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sascha <saschast> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED CONFIGURATION CHANGED | ||||||
Severity: | Normal | CC: | ap, ddkilzer, ian, joepeck, phistuck, thorton, wenson_hsieh | ||||
Priority: | P2 | Keywords: | HasReduction | ||||
Version: | 523.x (Safari 3) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=202859 | ||||||
Attachments: |
|
Description
Sascha
2008-02-06 04:50:35 PST
Created attachment 18959 [details]
test of min/max attributes of <input type=range> element
Additional Info: This problem also leads to a not functionality in Safaris RSS viewer. If you cklick the images on left/right of the scale slider result in no reaction. I have made a little patch on my own Safari (windows) and it works. I only add a test if the attribute is set or initalize it with it boundaries. File: Articles.js Location on Windows: Safari/PubSub.resources/Articles.js Patch: 1171,1172d1170 < if (slider.min == undefined) < slider.min = 0; 1177,1178d1174 < if (slider.max == undefined) < slider.max = 100; Why is this a bug? HTMLInputElement interface definition does not specify that these attributes should be available as properties AFAICT. One can use getAttribute() and related DOM methods to manipulate element attributes. (In reply to comment #2) > This problem also leads to a not functionality in Safaris RSS viewer. Thank you! Filed as <rdar://problem/5727306>. Web Forms 2.0 doesn't mention anything about including "min" and "max" as DOM attributes: http://www.whatwg.org/specs/web-forms/current-work/#ranges This now works correctly if you have explicitly provided min/max attribute values. However, it doesn't seem to work with the defaults, which are 0 and 100 for an <input type=range>. I am going to leave this open for that reason. I think this can be closed. When not explicitly specifying the min and max, all of the browsers I tested (Firefox, Safari and Chrome) behave the same - min and max have empty strings as their values. On the other hand, a bit unrelated, you may want to port this patch perhaps - https://bugs.chromium.org/p/chromium/issues/detail?id=852938#c7 (In reply to PhistucK from comment #7) > I think this can be closed. When not explicitly specifying the min and max, > all of the browsers I tested (Firefox, Safari and Chrome) behave the same - > min and max have empty strings as their values. > > On the other hand, a bit unrelated, you may want to port this patch perhaps - > https://bugs.chromium.org/p/chromium/issues/detail?id=852938#c7 Could you file a separate bug for the UI not updating when calling setAttribute()? Done. Bug 202859. This one can be closed. |