[wp-trac] [WordPress Trac] #40354: Improper use of jQuery hasClass method

WordPress Trac noreply at wordpress.org
Wed Apr 5 07:58:17 UTC 2017


#40354: Improper use of jQuery hasClass method
----------------------------------------+-------------------------
 Reporter:  kostasx                     |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.8
Component:  Media                       |     Version:  4.4
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  javascript
----------------------------------------+-------------------------

Comment (by kostasx):

 Replying to [comment:3 adamsilverstein]:
 > @kostasx thanks for the report.
 >
 > I was able to verify the selector doesn't work the way it is written.
 Did you discover this bug because of some unexpected behavior? The fix
 looks straightforward here, I want to make sure we are actually fixing and
 not breaking anything so it is helpful to be able to reproduce.
 >

 Hello. Yes, I discovered the bug while working with multiple media
 elements (audio players) on a page. When the wrong selector was used, as
 is the case in the pre-patched version, an already activated media element
 was re-activated causing the element to start playing again. When the
 patch was applied, the already activated media element continued playing
 with any problem.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40354#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list