Bug Tracker

Modify

Ticket #4965 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

Whitespace in class attribute causes selector trouble.

Reported by: brendo_ Owned by: john
Priority: minor Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

See the attached testcase is probably the easiest way to understand this bug.

Pretty much, the $('.field-date') finds the correct elements, but then in the each loop, $(this).hasClass('.field-date') fails when there is extra whitespace between the classes.

I think there might be two bugs here, because the original $('.field-date') finds the correct elements regardless of whitespace, but then hasClass chokes on the whitespace.

A pure JS test is provided too, which shows the correct results (two raw:true's)

Attachments

testcase.html Download (1.5 KB) - added by brendo_ 4 years ago.
Test Case (jQuery not provided)

Change History

Changed 4 years ago by brendo_

Test Case (jQuery not provided)

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #4761

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.