Call to Upgrade: MooTools 1.1.2 and MooTools 1.2.4
Written By David Walsh, on Monday, November 2nd 2009, 5:43pmYou’ve probably noticed a flurry of MooTools 1.2 updates recently, including updates to both MooTools Core and More. We’re happy to give them to you and hope you continue to upgrade your existing MooTools 1.2.x builds. We would like to bring to you attention an upgrade to the MooTools 1.1.2 build and MooTools 1.2.4 build which should be considered a mandatory upgrade for developers still using MooTools 1.1 and MooTools < 1.2.4.
Firefox 3.6 and document.getBoxObjectFor
The reason we stress the upgrade to MooTools 1.2.4 and MooTools 1.1.2 is the removal of the document.getBoxObjectFor method in the upcoming Mozilla Firefox 3.6 release. Within the browser detection code of MooTools 1.1 and earlier versions of 1.2, MooTools attempts to identify the Gecko engine by checking for the existence of document.getBoxObjectFor. Mozilla’s removal of this method in Firefox 3.6 effectively breaks Gecko detection in MooTools 1.1 and MooTools 1.2.3 down.
“What Effect Does This Have on My MooTools Build?”
Gecko detection is used within MooTools only twice — both times for event handling:
- Event.relatedTarget - Identifies the related target of any given event. This property is used in multiple places throughout the framework.
- The mousewheel event - Firefox identifies mousewheel events using “DOMMouseScroll” instead of “mousewheel.”
These items are at risk to break without upgrading your MooTools build.
The Solution Moving Forward
We have overhauled our browser detection to be based on the user agent string. This has become the standard practice among JavaScript libraries because of potential issues as Firefox 3.6 demonstrates. As browsers grow closer together, looking at “features” to separate them will become more difficult and risky. From this point forward, browser detection will only be used where it would be impossible not to, in order to give the consistent experience across browsers that one would expect from a world-class JavaScript framework.
“Where Can I Download Upgrades?”
You may download the updated MooTools 1.1.2 build on the MooTools 1.1.2 download page. You may also grab MooTools 1.1.2 from GitHub.
You may download the updated MooTools 1.2.4 build on the MooTools 1.2.4 download page. You may also grab MooTools 1.2.4 from GitHub.
Thank you for upgrading. We look forward to continued success with the MooTools javascript framework!
November 2nd, 2009 at 11:48 pm
Thanks a lot … i been using mootols since it was on moo.fx and i really love working on it
November 3rd, 2009 at 5:01 am
Nice to see you’re already considering beta browser versions. Keep up the good work guys!
November 3rd, 2009 at 1:17 pm
Good catch guys. Sort of random and off subject… May I suggest adding keeto’s “Up The Moo Herd” link? I mean alot of the links in the sidebar aren’t always that relevant to MooTools. Keeto’s series is really well done.
http://keetology.com/blog/2009/07/00-up-the-moo-herd-mootools-tips-and-tricks
November 3rd, 2009 at 1:48 pm
Any thought on dropping browser detection in favor of feature support? ala jQuery.support [http://docs.jquery.com/Utilities/jQuery.support]
Browser detection is dangerous as the Firefox 3.6 issue has shown. User Agent sniffing is just-as (or more) dangerous given the fact that users can change it.
November 4th, 2009 at 3:55 am
Great! I’ve come across two minor but yet annoying bugs and I can’t find the place to report them.
November 4th, 2009 at 5:53 am
Will update as soon as the tiny glitches (More.Tips) are fixed ;) Been using mootools for years now, and loving it!
November 4th, 2009 at 9:34 am
Thanks for also updating 1.1.1! Although I’d like to move existing applications from 1.1.1 to 1.2.4 it’s not always possible to do so (time, budget, etc.). Thanks.
November 5th, 2009 at 5:26 am
Why have the previous Mootools versions used getBoxObjectFor to detect Gecko, instead of User Agent?
And what will happen to those pages which won’t upgrade Mootols when Firefox 3.6 is released?
November 5th, 2009 at 11:57 am
Thanks for the 1.1.2 update! I get lib from google repository like always
November 6th, 2009 at 11:05 am
I don’t get an error creating a Tips instance, but I do get an annoying empty tooltip permanently stuck at the top left of my page. I’ll have to disable Tips altogether for now. Hopefully it’ll be fixed soon!
November 9th, 2009 at 2:09 pm
Look for a release that fixes Tips in the next day or so.