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

[ui] Prevent double-open for cmd+click on jobs index links #23832

Merged

Conversation

philrenaud
Copy link
Contributor

Previously, cmd+click (or ctrl+click) on the <a> tag within job rows on the jobs index page would double-open the page: once in a new tab (as cmd+click does) and another in the same tab (as it would trigger the {{on "click"}} Ember event for the job row.

This checks to make sure the clicked element wasn't the anchor tag itself, and if it is, it returns early.

NB: it's a bad practice, generally, to have non-interactive elements like table rows be clickable! However this follows a long-standing convention in the Nomad UI that users may be used to from years of use, and has more than one highly accessible fallback.

Resolves #23544

@philrenaud philrenaud self-assigned this Aug 15, 2024
@philrenaud philrenaud linked an issue Aug 15, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Aug 15, 2024

Ember Test Audit comparison

main 47b3f25 change
passes 1578 1578 0
failures 0 0 0
flaky 0 0 0
duration 11m 49s 414ms 11m 43s 747ms -05s 667ms

Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.8.x backport to 1.8.x release line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI - Cmd/Ctrl + Click won't correctly open new tabs
2 participants