#6739 closed defect (wontfix)
IE6 and IE7 - Widgets lose this.domNode (null) when instanciated in dojo.addonLoad()
Reported by: | guest | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dijit | Version: | 1.1b1 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
When a dijit.dialog is create inside dojo.addonLoad() it can lose some properties like this.domNode (?!)
There's no easy way to describe so see the attached test case , it's a pretty socking bug and unfortunately I couldn't nail it down...
Debugging IE is well a nightmare...
Fixing this bug would likely solve: http://trac.dojotoolkit.org/ticket/5142
And solve any other tickets about dojo.style() or "currentStyle" null error(s)
Attachments (3)
Change History (8)
Changed 14 years ago by
Attachment: | dialog.patch added |
---|
comment:1 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
That's a weird one alright.
I don't think it's because of the addOnLoad(), but rather because you are "sort of" going to another page by accessing an <a>'s href.... even though it's javascript: there's something that's enough to mess up IE. I'm attaching a testcase showing how the button (or anything w/an onclick handler) is fine, but the <a href=...> fails as you said.
Not sure I can do anything to "fix" this bug but I think that workaround should be sufficient for you.
Changed 14 years ago by
Attachment: | test_Dialog.html added |
---|
the onclick works, the a/href doesn't...
comment:2 Changed 14 years ago by
PS: you can sort of see what's happening if you use IE Developer Toolbar. You can see the <div> corresponding to the Dialog, but as soon as you do an action using an <a href="javascript:...">, even just printing "hello world", the <div> corresponding to the Dialog disappears.
comment:3 Changed 14 years ago by
Thanks
so we have:
BROKEN
<a href="javascript:invite.show()" style="font-weight:bold;">
BROKEN
<a href="javascript:void(0)" onclick="invite.show()">
OK
<a href="#bogus" onclick="invite.show()">
Wow, Microsoft really didn't want people to use javascript
comment:4 Changed 14 years ago by
Ha ha, yes, you've discovered their secret strategy. :-). Maybe there is some way to use the <a> but I just don't know it.
comment:5 Changed 14 years ago by
FYI, looks like this is a recent problem and may get fixed, see #6786. I still recommend using onclick="..." rather than href="..." though.
Test case to show the problem