From 2f9ffa65d78f799cba30f6205281b72c5dc5908d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 20 Jan 2016 14:39:38 +0100 Subject: [PATCH] JS: Ignore ids forms and form controls in getCSSPath() Id generation is unreliable. refs #10992 --- public/js/icinga/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/utils.js b/public/js/icinga/utils.js index b3a3b18a9..b1a0782db 100644 --- a/public/js/icinga/utils.js +++ b/public/js/icinga/utils.js @@ -286,7 +286,8 @@ while (true) { var id = $node.attr('id'); - if (typeof id !== 'undefined' && id.indexOf('form_') !== 0) { + // Ignore forms and form controls because id generation is unreliable :( + if (typeof id !== 'undefined' && ! $node.is(':input') && ! $node.is('form')) { path.push('#' + id); break; }