Closed
Bug 98239
Opened 23 years ago
Closed 21 years ago
innerHTML on button funkyness
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: jmd, Assigned: john)
References
()
Details
(Keywords: testcase)
Attachments
(4 files)
Go to URL, do the english one... Start and stop...the button gets reaaaly small. Play with the manual controls and Start again...odd. That code works fine in IE5 and 5.5. This works ok if I use an input type=button and change it's .value (the stuff that's commented out in the source). If innerHTML is an extention, is there some standard way to change the <button>'s text?
Comment 1•23 years ago
|
||
Yes... just modify the text node that's a child of the button.
Comment 2•23 years ago
|
||
or alternatively change its value attribute...
Reporter | ||
Comment 3•23 years ago
|
||
fair enough. I was having problems because I'm no web developer, and can't really take the time to read W3's incredibly obtuse DOM spec, for this one small JS my company needed. All the examples out there on the web I came across used non-standard stuff like innerHTML. Someone on #mozilla helpfully showed me removeChild(firstChild) / createTextNode / appendChild. I'm fine with a WONTFIX here, if the time could be better spent on making the REAL DOM work better, or some introductory docs for users used to the old proprietary DOMs.
Comment 4•23 years ago
|
||
Okay, I tried both the innerHTML approach as well as the text node approach but both cause the button to go haywire. I've tested this with the latest nightly (2001110921) on linux.
Comment 5•23 years ago
|
||
Comment 6•23 years ago
|
||
Comment 7•23 years ago
|
||
I've added two test cases. One takes the innerhtml approach to change the button text the other takes the Text Node approach to change the button text. Both however as I mentioned in my previous comment exhibit the same problem, namely the button text is annihilated. Again, I've tested this with the very latest nightly (2001110921) on Linux.
Comment 8•23 years ago
|
||
Funky. bz, any idea what gives with the text node testcase? Sounds like that should work, really.
Comment 9•23 years ago
|
||
Yes, it should. I remember poking at that code and not seeing obvious errors that would cause this... it feels like a form controls bug....
Comment 10•23 years ago
|
||
*** Bug 107259 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
Bug 107259 has a testcase that demonstrates this problem using replaceChild() as well....
Comment 12•23 years ago
|
||
Over to rods, formcontrol layout problem.
Assignee: jst → rods
Component: DOM Mozilla Extensions → HTML Form Controls
OS: Linux → All
QA Contact: lchiang → madhur
Hardware: PC → All
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 13•22 years ago
|
||
*** Bug 154475 has been marked as a duplicate of this bug. ***
Comment 14•22 years ago
|
||
This WFM with XBLFC.
Comment 15•22 years ago
|
||
Testcase shows that this is still broken. Comment 4 also says that this also occur if you do the text change via changing the text node. Using build 2002101308, Windows 2000.
Updated•22 years ago
|
Keywords: mozilla1.2
Comment 16•22 years ago
|
||
This testcase works fine, changing the button text with elm.firstChild.nodeValue instead.
Updated•22 years ago
|
Keywords: mozilla1.2 → mozilla1.3
Updated•21 years ago
|
Keywords: mozilla1.3
Comment 18•21 years ago
|
||
Fixed by patch in bug 226016
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•