Hi Arian,

Thanks for your quick response! Yes, this fixes the problem, even if it's
added after the MooTools core (but before the script itself):
http://jsfiddle.net/wZsax/1/

Thanks again,
Ralph


On Tue, Dec 11, 2012 at 12:55 PM, Arian Stolwijk
<[email protected]>wrote:

> I think this relates to
> https://github.com/mootools/mootools-core/issues/2402
>
> Could you add this somewhere, probably before adding MooTools to the page.
>
>
> String.prototype.contains = function(string, separator){
>
>       return (separator) ? (separator + this + separator).indexOf(separator + 
> string + separator) > -1 : String(this).indexOf(string) > -1;
>
> };
>
>
> We probably need to fix this as a 1.2.6.
>
>
> On Tue, Dec 11, 2012 at 12:50 AM, Ralph Slooten <[email protected]> wrote:
>
>> Hi all,
>>
>> Please forgive me if this issue has been noted before (I couldn't find
>> it), however I noticed some strange behaviour resulting from Firefox beta
>> and the $$ selector (using class names) using MooTools 1.2.5. I do realise
>> that 1.2.5 is old, however we have several sites using it, and this issue
>> seems to be something that could affect several of them. I was hoping to
>> find the answer/solution before having to start rewriting stuff :)
>>
>> *Problem:*
>> It would seem that something like $$('div.find') also finds partial
>> matches for elements eg: <div class="finds">, or <div class="donotfindme">
>> when using 1.2.5 and the beta version of FireFox.
>>
>> I have an example on jsfiddle.net/wZsax/ - all other browsers seem fine
>> and find just the first element, however FF beta finds both.
>>
>> I realise that this does not happen in later versions of MooTools, nor
>> with the stable version of Firefox (v17), however should the beta become
>> stable (assuming no change to the JS engine affecting this), then this
>> could become a bigger problem.
>>
>> Could anyone point out whether this is a bug in MooTools 1.2.5, and if so
>> whether there could be a fix at the core-level?
>>
>> Many thanks & kind regards,
>> Ralph
>>
>
>

Reply via email to