Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery 3.5.1 causes issue with column chooser #500

Open
rbruhn opened this issue Aug 20, 2020 · 2 comments
Open

jQuery 3.5.1 causes issue with column chooser #500

rbruhn opened this issue Aug 20, 2020 · 2 comments

Comments

@rbruhn
Copy link

rbruhn commented Aug 20, 2020

I've created two JsFiddles to display this issue.

  1. https://jsfiddle.net/rbruhn/zo8ancqm/ jQuery 3.5.1
  2. https://jsfiddle.net/rbruhn/uasxkd7L/ jQuery 3.4.1

As can be seen when using column chooser, the text is displayed in 3.4.1 but not 3.5.1. It seems the jQuery is overriding something but I can't figure it out. Any ideas?

@tyddynonn
Copy link

tyddynonn commented Oct 31, 2020

This is caused by a change in jQuery htmlPrefilter.
The workaround at https://jquery.com/upgrade-guide/3.5/ fixes the problem.
If I can identify a change in the jqGrid source that fixes this I'll post here.

Note: I think the issue is most likely in the multiselect widget https://github.com/michael/multiselect

@tyddynonn
Copy link

tyddynonn commented Oct 31, 2020

So, sorted.

The problem is in the multiselect widget. It treats <span> tags as self-closing when under latest specs they are not.
So in 'ui.multiselect.js' at around line 160ish in function _getOptionNode, change

var node = $('<li class="ui-state-default ui-element" title="'+option.text()+'" data-selected-value="' + option.val() + '"><span class="ui-icon"/>'+option.text()+'<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a></li>').hide();

to

var node = $('<li class="ui-state-default ui-element" title="' + option.text() + '" data-selected-value="' + option.val() + '"><span class="ui-icon"></span>' + option.text() + '<a href="#" class="action"><span class="ui-corner-all ui-icon"></span></a></li>').hide();

There's already a PR addressing this in the multiselect repo: see michael/multiselect@ebcc76f

but I found that didn't work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants