Repository navigation
Fixed event handler on click - #159
Merged
Merged
Conversation
MaxDac
enabled auto-merge (squash)
September 18, 2025 17:10
There was a problem hiding this comment.
Pull Request Overview
This PR improves the specificity of button selection for session name copy functionality by requiring buttons to have both data-session-name and data-action attributes. This prevents unintended element selection and ensures only the correct buttons are targeted for clipboard operations.
- Updated selector in
getCopyButtonsfunction to target elements with both required attributes - Synchronized all test cases to use the new selector pattern
- Updated test HTML setup to include the
data-actionattribute
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/privee_web/assets/js/utils/clipboard.mjs | Updated getCopyButtons function to use more specific selector requiring both data attributes |
| apps/privee_web/assets/js/tests/clipboard.test.mjs | Updated all test selectors and HTML setup to match the new implementation requirements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
auto-merge was automatically disabled
September 18, 2025 17:15
Pull request was closed
MaxDac
enabled auto-merge (squash)
September 18, 2025 17:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the selection logic for session name copy buttons to ensure only buttons with both
data-session-nameanddata-actionattributes are targeted. This change is reflected in both the implementation and all related tests to improve specificity and prevent unintended element selection.Button selection logic update:
getCopyButtonsfunction inclipboard.mjsto select buttons with bothdata-session-nameanddata-actionattributes, improving selector specificity.Test updates for selector consistency:
clipboard.test.mjsto use the updated selector[data-session-name][data-action]when querying for buttons, ensuring tests match the new implementation. [1] [2] [3] [4] [5] [6]data-actionattribute on button elements, reflecting the new requirements for copy button identification.