Call to Upgrade: MooTools 1.1.2 and MooTools 1.2.4

Written By David Walsh, on Monday, November 2nd 2009, 5:43pm

You’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!

11 Responses to “Call to Upgrade: MooTools 1.1.2 and MooTools 1.2.4”

  1. Vamsi says:

    Thanks a lot … i been using mootols since it was on moo.fx and i really love working on it

  2. Nicolas says:

    Nice to see you’re already considering beta browser versions. Keep up the good work guys!

  3. Merrick Christensen says:

    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.

  4. Jason says:

    Any thought on dropping browser detection in favor of feature support? ala []

    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.

  5. Mark says:

    Great! I’ve come across two minor but yet annoying bugs and I can’t find the place to report them.

    1. Opening the contextmenu on a sortables ul > li disabled sortables from that moment on, recreating an instance of the sortables does the trick, but to my surprise the .attach() and .detach() do nothing.
    2. The tips create an error at the creation of a new tips instance.
  6. Jean-Régis says:

    Will update as soon as the tiny glitches (More.Tips) are fixed ;) Been using mootools for years now, and loving it!

  7. Htbaa says:

    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.

  8. Jerzy says:

    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?

  9. Allogarage says:

    Thanks for the 1.1.2 update! I get lib from google repository like always

  10. voskat says:

    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!

  11. aaron says:

    Look for a release that fixes Tips in the next day or so.