Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Qlik Sense Enterprise on Windows Search not working in Bootstrap modal in mashups

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Damien_Villaret
Support
Support

Qlik Sense Enterprise on Windows Search not working in Bootstrap modal in mashups

Last Update:

Feb 24, 2022 4:47:27 AM

Updated By:

Damien_Villaret

Created date:

Oct 14, 2019 10:22:03 AM

Search is not working in Bootstrap modal in mashups in Qlik Sense.

Environments:

 

The Bootstrap Modal has code that makes sure the focus does not go outside the Modal element.

 https://github.com/twbs/bootstrap/blob/v3.3.7/js/modal.js#L139

This code only seems to work as the developers have intended in Internet Explorer, because in Chrome the focus stays on the input field in the Qlik Sense Listbox, but in IE the focus is returned to the Bootstrap Modal element.

This is all happening because the Listbox popover is dynamically added to the DOM in the Body element and not inside the Bootstrap Modal element. This is a very common solution to avoid other types of problems. And therefore there a lot of other libraries/UI-projects that have the same problem described above.

 https://github.com/zenorocha/clipboard.js/issues/155

https://github.com/twbs/bootstrap/issues/19971

The good thing is that there is a very easy way to solve it and that is to override the enforceFocus function (that only works in IE anyways). It’s done with the following line:

 $.fn.modal.Constructor.prototype.enforceFocus = function() {};

example of enforcefocus code.png

 

Internal investigation ID: QLIK-96770

Labels (1)
Version history
Last update:
‎2022-02-24 04:47 AM
Updated by: