JS: Ignore ids forms and form controls in getCSSPath()

Id generation is unreliable.

refs #10992
This commit is contained in:
Eric Lippmann 2016-01-20 14:39:38 +01:00
parent 323c1e3ebb
commit 2f9ffa65d7
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}