Closed Bug 947887 Opened 8 years ago Closed 8 years ago
Attribute style with a dash (stroke-width) doesn't update in Firefox but OK in other browsers
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release) Build ID: 20131112160018 Steps to reproduce: Try this - <rect x="10" y="10" width="100" height="75" style="stroke: #000000; fill: #eeeeee;" onmouseover="this.style.stroke = '#ff0000'; this.style['stroke-width'] = 5;" onmouseout="this.style.stroke = '#000000'; this.style['stroke-width'] = 1;" /> Actual results: (Firefox 25.0.1) The color attribute changes but the stroke-width doesn't. Expected results: The stroke-width should change. Works OK with Chrome (Version 31.0.1650.63 m), Safari & IE 11.
stroke-width is exposed to the DOM as "strokeWidth", not "stroke-width". So, the testcase doesn't tweak the stroke-width because it's not actually accessing it. If you change the testcase to use "strokeWidth", it works correctly. The original testcase "works" in Chrome, which is a bug. Mind reporting it to them? (Opera 12.16 (with Presto, not Blink) renders it correctly -- matching Firefox)
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
(I presume "other browsers" in the bug summary is just "WebKit(/Blink)-based browsers", correct? or does IE get this wrong, too?)
In IE11 (Win 7), same rendering for the reporter testcase and the fixed testcase (red stroke is larger).
Daniel, Sorry for the diversion. So the majority are not always correct.
(In reply to Dave Courtney from comment #6) > Daniel, > > Sorry for the diversion. So the majority are not always correct. It's common, some reporters think Chrome is the bible of the implementation of HTML features. Of course not, and Chrome is wrong in many ways. ;)
You need to log in before you can comment on or make changes to this bug.