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

Content Tree: event trigger on shift arrow keys #2509

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

prashanthr6383
Copy link
Collaborator

@prashanthr6383 prashanthr6383 commented May 8, 2024

Description

Created a function to handle click event using shift + arrow keys

Fixes #1713

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Copy link

netlify bot commented May 8, 2024

Deploy Preview for moduswebcomponents ready!

Name Link
🔨 Latest commit af4c5f6
🔍 Latest deploy log https://app.netlify.com/sites/moduswebcomponents/deploys/66547be0cbd8d9000897f61b
😎 Deploy Preview https://deploy-preview-2509--moduswebcomponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 23 (🔴 down 1 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@coliff coliff changed the title 1713 - content tree event trigger on shift arrow keys Content Tree: event trigger on shift arrow keys May 9, 2024
@coliff coliff requested a review from cjwinsor May 9, 2024 12:10
@cjwinsor cjwinsor added modus-tree-view bug Something is wrong and needs to be addressed labels May 9, 2024
@cjwinsor
Copy link
Contributor

@prashanthr6383 Can you take a look to make sure that the itemClick event is fired for the correct element when its selected and deselected via the shift arrow keys? If I add a listener to a single element (Social) and i select the item above it first, then do shift down, it doesn't fire the event, but when i unselect it, it does with shift up. It also fires on shift down, which shoudl trigger the item click for the below item, not Social. Double check the arg that is returned as well: True for selected, False for unselected

@prashanthr6383
Copy link
Collaborator Author

prashanthr6383 commented May 20, 2024

@prashanthr6383 Can you take a look to make sure that the itemClick event is fired for the correct element when its selected and deselected via the shift arrow keys? If I add a listener to a single element (Social) and i select the item above it first, then do shift down, it doesn't fire the event, but when i unselect it, it does with shift up. It also fires on shift down, which shoudl trigger the item click for the below item, not Social. Double check the arg that is returned as well: True for selected, False for unselected

@cjwinsor Updated the code. Now the event trigger for shift up and shift down will return true for selected and false for unselected, but though the itemClick seems to be firing correctly, the selected element is the previous one. Can you confirm if this is the expected behavior of shift + arrow or still needs to be fixed? 

2024-05-22.12-03-44.mp4

@prashanthr6383 prashanthr6383 marked this pull request as draft June 10, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong and needs to be addressed modus-tree-view
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content Tree - Event handling for Ctrl+Click and Shift+ArrowKeys
2 participants