-
Notifications
You must be signed in to change notification settings - Fork 998
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
Fixes #38237 - select2 search not working in modals #10456
base: develop
Are you sure you want to change the base?
Conversation
Makes sense to me |
I ran tests locally and they run ok, is the failures related with the github testing? |
For some reason they ran for 5 hours and then timed out. I wonder if some page is just "frozen" |
Wouldnt that mean that the test would have failed in other prs for the same reason? @ekohl |
Not if this PR in particular is introducing the breakage somewhere. |
so my question is how can I make my local env more like the github env to see the failures? @ekohl |
Working on fixing the tests, taking a while since they dont show up with |
b6d2750
to
9c1506b
Compare
@@ -27,7 +27,7 @@ function show_interface_modal(modal_content) { | |||
modal_window | |||
.find('.modal-title') | |||
.text(__('Interface') + ' ' + String(identifier)); | |||
modal_window.modal({ show: true }); | |||
modal_window.modal({ show: true , backdrop: 'static'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow because of the select parent change, if its inside a modal, there is, a pixel in the select in the modal, that if a user clicks on at the right timing, closes the modal as its somehow outside the modal.
This makes is so the modal isnt closed on a click out side (only by clicking the X/save/cancel buttons)
other modal in the hosts page already has it $('#host-conflicts-modal').modal({ show: 'true', backdrop: 'static' });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests, while running in normal, in headless mode, some how click this pixel in the second select in the interface modal, and close it
This is a problem in the foreman-discovery plugin, but I thought its best to put it in core in case there are more places with this issue
I think its safe to assume that if its a select2 inside a modal the parent class name will be "modal"
$(document.body);
is the default value in select2https://select2.org/dropdown#dropdown-placement
to reproduce: When selecting the Provision option for a discovered host, the system prompts for "Select initial host properties" such as Host Group, Organization, and Location. However, when clicking on the dropdown menus for these fields and attempting to filter values by typing, the functionality does not work—essentially, input cannot be typed into the filter field.