HomePhabricator

jquery.makeCollapsible: Restore considering empty <a> as part of toggle

Description

jquery.makeCollapsible: Restore considering empty <a> as part of toggle

Before 2d95d36a8e, clicks on links inside toggles with non-empty
targets that are not '#', were ignored ("pass through") since they
are not intended for the toggle.

In 2d95d36a8e, this was simplified to ignoring clicks from all <a>
elements inside toggles. However this ignored too much as links
without 'href' attribute are also sometimes used inside toggles
to look like links and have no href-target, which means clicking
them does nothing and is in fact meant to toggle the element.

Restore previous behaviour and restore previous test + add a new
test for this specific case.

Bug: T166298
Change-Id: Ia3a0648f809f94be0977a83b469fbd184aa72aff

Details

Provenance
KrinkleAuthored on May 25 2017, 9:08 PM
matmarexCommitted on May 25 2017, 9:23 PM
Parents
rMWeaf2957ba70e: Revert "Creating new WMF 1.30.0-wmf.2 branch"
Branches
Unknown
Tags
Unknown
ChangeId
Ia3a0648f809f94be0977a83b469fbd184aa72aff