utils.js: Utilize ids of forms and elements in getCssPath

They're now reliable again :)

fixes #2238
This commit is contained in:
Johannes Meyer 2019-04-17 11:25:10 +02:00
parent c8a49414b1
commit c835f02953
1 changed files with 1 additions and 2 deletions

View File

@ -286,8 +286,7 @@
while (true) {
var id = $node.attr('id');
// Ignore forms and form controls because id generation is unreliable :(
if (typeof id !== 'undefined' && ! $node.is(':input') && ! $node.is('form')) {
if (typeof id !== 'undefined') {
path.push('#' + id);
break;
}