jquery.makeCollapsible: Restore considering empty <a> as part of toggle
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 25 May 2017 21:08:24 +0000 (23:08 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 25 May 2017 21:23:17 +0000 (21:23 +0000)
commit15b88fc2807c21c4fbefbb75ba2433d3d150b34a
tree80ffa7676b4b9c04a2da72a1d837b8ce389784d3
parenteaf2957ba70e74c386229cd5ff58ddb9eb689471
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
resources/src/jquery/jquery.makeCollapsible.js
tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js