-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Bug Fix] Prevent the expanding/collapsing of the subject area when the link is being clicked #6445
[Bug Fix] Prevent the expanding/collapsing of the subject area when the link is being clicked #6445
Conversation
…simultaneously-collapse-the-subject-area
…ubject-area' of github.com:Philippos01/openlibrary into 6361/Bug-Fix/subject-tags-simultaneously-collapse-the-subject-area
for more information, see https://pre-commit.ci
…ubject-area' of github.com:Philippos01/openlibrary into 6361/Bug-Fix/subject-tags-simultaneously-collapse-the-subject-area
for more information, see https://pre-commit.ci
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.
This should be good to merge once the requested changes have been made.
Co-authored-by: jimchamp <jameschamp@acm.org>
Co-authored-by: jimchamp <jameschamp@acm.org>
Co-authored-by: jimchamp <jameschamp@acm.org>
Co-authored-by: jimchamp <jameschamp@acm.org>
@jimchamp we commited the proposed changes. |
…simultaneously-collapse-the-subject-area
for more information, see https://pre-commit.ci
…ubject-area' of github.com:Philippos01/openlibrary into 6361/Bug-Fix/subject-tags-simultaneously-collapse-the-subject-area
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.
Lgm! Tested on gitpod. Clicking header expands. Clicking anchor does not. Yaaay unit tests!
Talked with @jimchamp ; taking this to try to get it in today's deploy 👍 |
Closes #6361
With this fix, we achieve preventing collapsing and expanding of the subject area while a link from the
a
tag in being clicked.Technical
We attached to the jQuery click event handler an argument in order to check if the nodeName of the tag is
a
. If this is true, there is no need to expand/collapse and the user should be redirected to the corresponding page.Testing
On the book page, click a link on the Subjects, People or Pages. The list expands which is an incorrect behavior before redirecting.
Screenshot
book-page-subjects-not-expanding.mp4
Stakeholders
@cdrini
@jimchamp
Attribution Disclaimer: By proposing this pull request, I affirm to have made a best-effort and exercised my discretion to make sure relevant sections of this code which substantially leverage code suggestions, code generation, or code snippets from sources (e.g. Stack Overflow, GitHub) have been annotated with basic attribution so reviewers & contributors may have confidence and access to the correct context to evaluate and use this code.