Merge branch '29414-fix-toggle-disccusion-link-jump-pick-into-9-0' into 'master'
Fix link togglers jumping to top Closes #29414 See merge request !9943
This commit is contained in:
commit
8fddde5b9f
1 changed files with 6 additions and 1 deletions
|
@ -21,8 +21,13 @@
|
|||
// %a.js-toggle-button
|
||||
// %div.js-toggle-content
|
||||
//
|
||||
$('body').on('click', '.js-toggle-button', function() {
|
||||
$('body').on('click', '.js-toggle-button', function(e) {
|
||||
toggleContainer($(this).closest('.js-toggle-container'));
|
||||
|
||||
const targetTag = e.target.tagName.toLowerCase();
|
||||
if (targetTag === 'a' || targetTag === 'button') {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// If we're accessing a permalink, ensure it is not inside a
|
||||
|
|
Loading…
Reference in a new issue