mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
utils.js: Use jQuery to check id uniqueness
This commit is contained in:
parent
52d51f0ee5
commit
762663a3f6
@ -374,7 +374,10 @@
|
|||||||
var id = element.id;
|
var id = element.id;
|
||||||
|
|
||||||
// Only use ids if they're truly unique
|
// Only use ids if they're truly unique
|
||||||
if (!! id && document.querySelectorAll('* #' + id).length === 1) {
|
// TODO: The check used to use document.querySelectorAll, but this resulted in many issues with ids
|
||||||
|
// that start with a decimal. jQuery seems to escape those correctly, so this is the only reason
|
||||||
|
// why it's still.. jQuery.
|
||||||
|
if (!! id && $('* #' + id).length === 1) {
|
||||||
path.push('#' + id);
|
path.push('#' + id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user