-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[JENKINS-72759] fix handling of readonly for select without parent div #8984
Conversation
when no parent div is present that has .jenkins-select we get a null element and the script runs into an error.
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.
Thanks!
@@ -150,6 +150,7 @@ Behaviour.specify("SELECT.select", "select", 1000, function (e) { | |||
// handle readonly mode, the actually selected option is only filled asynchronously so we have | |||
// to wait until the data is filled by registering to the filled event. | |||
if ( | |||
parentDiv != null && |
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.
any reason to not do this?
parentDiv != null && | |
parentDiv !== null && |
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.
Also it is technically not possible, if parentDiv would be undefined the !==
would evaluate to true and the following access to dataset would fail
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.
/label ready-for-merge
This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.
Thanks!
when no parent div is present that has .jenkins-select we get a null element and the script runs into an error.
This affects all plugins that use
<st:adjunct includes="lib.form.select.select"/>
but do not have surrounded the select with<div class="jenkins-select">
See JENKINS-72759.
Testing done
interactive testing
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist