Unbreak Dojo 1.7
By Hallvord R. M. Steenhallvors. Monday, April 16, 2012 3:19:52 PM
I've shipped a small and urgent update for 11.62 only.Added patches
PATCH-616 Make document.attachEvent extra undefined for Dojo 1.7.x
This is a workaround for CORE-45475, a subtle bug which causes problems for Dojo. An affected page like this demo caused console errors saying Uncaught exception: Error: WRONG_THIS_ERR.
Dojo says
has.add("ie-event-behavior", doc.attachEvent && (typeof opera === "undefined" || opera.toString() != "[object Opera]"));
which worked just fine until we tried hiding document.attachEvent and introduced a bug: even though doc.attachEvent on its own evaluates to false, when the && operator is used the engine will evaluate the second part too and return the first part if the second part evaluates to true. The returned function is later called in a way that makes it throw a "wrong this object" type error.
First we noticed this in Dojo demos, and I wasn't sure if it was a problem on production sites. However, when a user reported problems loading a local Norwegian bank and the Dojo issue turned out to be the root cause, we whipped up a patch.









Hallvord R. M. Steenhallvors # Monday, April 16, 2012 3:30:20 PM
Charles SchlossChas4 # Monday, April 16, 2012 4:39:35 PM
Target version and time stamp of the active browser.js file is Opera Desktop 11.62 core 2.10.229, April 12, 2012. Active patches: 180 .
not sure what this ones date should be
Hallvord R. M. Steenhallvors # Monday, April 16, 2012 9:38:17 PM
ouzowtfouzoWTF # Tuesday, April 17, 2012 4:35:17 PM
example: http://d.pr/i/IExr
rseiler # Tuesday, April 17, 2012 7:42:39 PM
Opera Desktop 12.00 core 2.10.289, April 10, 2012. Active patches: 170
Opera Desktop 11.62 core 2.10.229, April 12, 2012. Active patches: 180
Example URL:
http://social.technet.microsoft.com/Forums
Ned the NaniteNedTheNanite # Wednesday, April 18, 2012 7:45:35 PM
Anyone else noticed this?
Swapnil RustagiSwapnil99pro # Thursday, April 19, 2012 4:32:58 PM
Originally posted by rseiler:
Confirmed. Really bad - need to use IE 8 to post replies.
Hallvord R. M. Steenhallvors # Friday, April 20, 2012 7:32:56 PM
Originally posted by rseiler:
Hey, good catch. I have a site patch ready, details will be in next blog post :-)
Ola P. Kleivenolak # Monday, April 23, 2012 11:22:14 AM
Steve Fosterq1rwp # Tuesday, May 8, 2012 1:27:51 PM
Public links to site:
https://www.ebu.co.uk/ngs/
https://www.ebu.co.uk/members/
I've had to resort to using another browser (IE9) to login to the latter portion of their site.
Hallvord R. M. Steenhallvors # Thursday, May 10, 2012 12:06:09 PM
Originally posted by q1rwp:
Right.. it's because browser.js can't tell that it's Dojo version 1.7.x. I wanted to limit this patch because we haven't tested it a lot..
I guess we could rewrite the patch a little bit to do a script search/replace, which should actually be safer in terms of not breaking Dojo versions we haven't tested. (This may sound a bit weird, but it takes only a very minor rewrite to avoid this bug..)
Or.. you could simply upgrade to 11.64 - see this changelog: http://www.opera.com/docs/changelogs/windows/1164/