mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
js: Fix that buttons with any DOM descendants are not ignored by linkClicked
fixes #8380
This commit is contained in:
parent
43691f6612
commit
0c0478688e
@ -364,6 +364,7 @@
|
|||||||
var self = event.data.self;
|
var self = event.data.self;
|
||||||
var icinga = self.icinga;
|
var icinga = self.icinga;
|
||||||
var $a = $(this);
|
var $a = $(this);
|
||||||
|
var $eventTarget = $(event.target);
|
||||||
var href = $a.attr('href');
|
var href = $a.attr('href');
|
||||||
var linkTarget = $a.attr('target');
|
var linkTarget = $a.attr('target');
|
||||||
var $target;
|
var $target;
|
||||||
@ -400,9 +401,17 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore form elements in action rows
|
if (! $eventTarget.is($a)) {
|
||||||
if ($(event.target).is('input') || $(event.target).is('button')) {
|
if ($eventTarget.is('input') || $eventTarget.is('button')) {
|
||||||
return;
|
// Ignore form elements in action rows
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
var $button = $('input[type=submit]:focus').add('button[type=submit]:focus');
|
||||||
|
if ($button.length > 0 && $.contains($button[0], $eventTarget[0])) {
|
||||||
|
// Ignore any descendant of form elements
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignore multiselect table row clicks
|
// ignore multiselect table row clicks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user