-
Notifications
You must be signed in to change notification settings - Fork 270
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
[Angular] The page is redirected to the home page of the website after clicking the "Change associated content" button in the Experience Editor in angular application #835
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sitecore-jss/edge-e2e-styleguide/gp6b1hEk7ae8YmkAzuEfncongeSc |
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.
Looks good, please, see some questions
- Use ExperienceEditor class for active editor check - Change null check for targetNode
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.
👍
…r clicking the "Change associated content" button in the Experience Editor in angular application (#835) * Add workaround for Angular not handling EE onclick * Change import to angluar pkg * Move code to utils in angular package * Add comment to sample * Refactor based on comments * More refactoring - Use ExperienceEditor class for active editor check - Change null check for targetNode * Use isExperienceEditorActive method for release/18.0.0 branch (cherry picked from commit 103b7a5)
Angular treats anchor tags with href attributes as links and ignores any onclick handlers that may be present on the element in favor of navigating to the href.
Add a workaround so that when using the Experience Editor, Angular properly executes the onclick provided by Experience Editor instead of routing to the href.
Description / Motivation
Experience Editor dropdown buttons were not functioning as expected in the Angular sample app
Testing Details
Check markup in Experience Editor, click on button to see it now behaves as expected
Types of changes
/docs
directory)