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

[JENKINS-71753] FIXED: clicking choices doesn't work #12

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

ikedam
Copy link
Member

@ikedam ikedam commented Aug 11, 2023

https://issues.jenkins.io/browse/JENKINS-71753

Before this fix:

01-beforefix

After this fix:

02-afterfix

Context:

  • Focusing the textbox should open choices. And losing focus from the textbox should close choices.
  • Though clicking a choice should update the textbox, it also results losing focus from the textbox.
  • HTML fires events in following order: blur for the textbox, and then click for the choice.
  • Closing choices in blur event prevents click for the choice from fired.
  • So this plugin calls setTimeout() in blur event and performs delayed choices-closing.
  • Though this delay worked correct with 100ms before, it now no longer work as expected (just as attached animations).
  • This change makes the delay longer. After some tests, it requires 500ms delay.

This is just a workaround, and depends on the behaviors of browsers. There's no fundamental solution for this issue.

Testing done

  • No test code for this change. Unfortunately, I couldn't reproduce the issue with test codes.
  • I tested the behaviors manually:
    • Firefox 116.0.2 (64 bits) / Windows 11 Home 22H2 (22621.1992)
    • Chrome 115.0.5790.171 (64 bits) / Windows 11 Home 22H2 (22621.1992)

Submitter checklist

Preview Give feedback

* set longer delays for blur/click hack
@ikedam ikedam added the bug Something isn't working label Aug 11, 2023
@ikedam ikedam self-assigned this Aug 11, 2023
@ikedam ikedam requested a review from a team as a code owner August 11, 2023 06:48
@ikedam ikedam merged commit 02a291e into jenkinsci:main Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant