This project is archived and is in readonly mode.

#716 ✓resolved
Radovan Kepák

$$ selector problem

Reported by Radovan Kepák | July 28th, 2009 @ 01:09 PM | in 1.3.0 rc2 (closed)

I have website, created a plugin for mail rewrite, so the spambots don't have chance to get them. I use prototype first, then I decide to switch to mootools, but I found a problem, on prototype I have selector $$('a[href^="#mailer"]').each(function(item){
//do stuff }); in prototype it works OK, but no element found in mootools :( i try a[href^=#mailer] and same problem, but if I remove #, selector work ok

My mail protector is in attach

Comments and changes to this ticket

  • Regina Luk

    Regina Luk August 7th, 2009 @ 11:30 PM

    The problem lies with Selectors.RegExps.id. When the selector 'a[href^="#mailer"]' gets processed by that regular expression in the Selectors.Utils.search method, it captures 'mailer' as an id. Because of this, when Selectors.Utils.search calls Selectors.Utils.getByTagAndID, it looks for a tags where id is mailer and returns nothing.

  • Scott Kyle

    Scott Kyle August 8th, 2009 @ 04:30 PM

    Thanks for the bug report and finding the root cause. This is already fixed in MooTools 2.0. Until that comes out, I suggest finding a workaround, such as $$('a[href*=mailer]').

  • Scott Kyle

    Scott Kyle September 4th, 2009 @ 03:32 AM

    • Assigned user set to “Scott Kyle”
    • State changed from “new” to “open”
  • Fábio M. Costa

    Fábio M. Costa April 4th, 2010 @ 10:35 PM

    • Milestone changed from 2.0 to 1.3.0 rc2
    • State changed from “open” to “resolved”

    Yes this should work fine on 1.3, there are specs for this on Slick. Fixed.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Attachments

Pages