Mootools v1.11 as shipped has a few bugs I came across. I was assured there couldn’t be any, as it’s been out for a while.
[Mon Jul 16 2007] [15:36:10] <Yuffster> JasonBoxatWork: Whoah, you get to box at work, Jason. [Mon Jul 16 2007] [15:36:11] <Yuffster> NICE. [Mon Jul 16 2007] [15:36:21] * JasonBoxatWork laughs [Mon Jul 16 2007] [15:36:27] <Yuffster> Try redownloading. [Mon Jul 16 2007] [15:36:45] <Yuffster> If it's still broken when you do that, it's something you're doing. [Mon Jul 16 2007] [15:36:49] <Yuffster> 1.11 has been out for ages now. [Mon Jul 16 2007] [15:36:51] <Yuffster> We'd know if it was broken.
First, Firebug is encountering malformed XML errors in Content-Type: text/javascript replies. I did not have this problem with the evalScripts function in mootools v1.0, but the one in v1.11 is substanially more complicated. One new feature is it will evaluate the whole response as if you specified evalResponse yourself. The aforementioned Content-Type header triggers the behavior.
evalScripts: function(){
var script, scripts;
- if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) scripts = this.response.text;
+ if (this.options.evalResponse) scripts = this.response.text;
Above is a diff of my resolution. The JavaScript I am sending to the browser is valid and Firebug reports no errors with the above change when my returned JavaScript in script tags is evaluated by Firefox 1.5 and Opera 9.
The second issue I have encountered in mootools v1.11 is the Tips plugin will display tips partially off screen if you enable the fixed option.
if (el.$tmp.myTitle && el.$tmp.myTitle.length > this.options.maxTitleChars) el.$tmp.myTitle = el.$tmp.myTitle.substr(0, this.options.maxTitleChars - 1) + "…";
- el.addEvent('mouseenter', function(event){
+ el.addEvent('mouseover', function(event){
this.start(el);
- if (!this.options.fixed) this.locate(event);
- else this.position(el);
- }.bind(this));
+ this.locate(event);
+ }.bindWithEvent(this));
if (!this.options.fixed) el.addEvent('mousemove', this.locate.bindWithEvent(this));
Above I reverted to the mootools v1.0 way of handling the mouse event. Now with fixed enabled tooltips will appear on the side of the window where each will be fully visible.
Harald said,
August 29, 2007 at 7:48 am
How can they tell you that there are no bugs when you encounter bugs? Simple … they do not know them until you not create a ticket with a test case and maybe even a possible fix at http://dev.mootools.net :-) . That’s the best way to contribute to MooTools and reduce possible bugs ;-)