Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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: jbondc@…
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)

dialog.patch (1.5 KB) - added by guest 11 years ago.
Test case to show the problem
test_Dialog.html (2.4 KB) - added by bill 11 years ago.
the onclick works, the a/href doesn't…
dialog2.patch (1.3 KB) - added by guest 11 years ago.
onclick or javascript: broken

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by guest

Attachment: dialog.patch added

Test case to show the problem

comment:1 Changed 11 years ago by bill

Resolution: wontfix
Status: newclosed

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 11 years ago by bill

Attachment: test_Dialog.html added

the onclick works, the a/href doesn't...

comment:2 Changed 11 years ago by bill

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.

Changed 11 years ago by guest

Attachment: dialog2.patch added

onclick or javascript: broken

comment:3 Changed 11 years ago by guest

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 11 years ago by bill

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 11 years ago by bill

FYI, looks like this is a recent problem and may get fixed, see #6786. I still recommend using onclick="..." rather than href="..." though.

Note: See TracTickets for help on using tickets.