Ticket #6739 (closed defect: wontfix)

Opened 7 months ago

Last modified 7 months ago

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
Severity: major Keywords:
Cc: jbondc@…

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

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

Change History

Changed 7 months ago by guest

Test case to show the problem

Changed 7 months ago by bill

  • status changed from new to closed
  • resolution set to wontfix

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 7 months ago by bill

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

Changed 7 months 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 7 months ago by guest

onclick or javascript: broken

Changed 7 months 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

Changed 7 months 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.

Changed 7 months 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.