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

Prevent the click event on a solution or hint accordion button instead of the details. #1179

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Jan 15, 2025

Only prevent the default click behavior when the user clicks on the summary or something within the summar. Allow the click event default to occur otherwise.

Instead add e.preventDefault() to the summary.accordion-button click event listener instead of preventing all clicks on the details tag.

This fixes issue #1178.

This could be made into a hotfix if desired.

Copy link
Contributor

@somiaj somiaj left a comment

Choose a reason for hiding this comment

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

Confirmed this fixes the issue. A hot fix sounds reasonable.

@drgrice1 drgrice1 force-pushed the details-accordion-selectively-prevent-click branch from 6dacc14 to db3a74c Compare January 15, 2025 21:38
…ead of the details.

Add `e.preventDefault()` to the `summary.accordion-button` `click` event
listener instead of preventing all clicks on the `details` tag.

This fixes issue openwebwork#1178.
@drgrice1 drgrice1 force-pushed the details-accordion-selectively-prevent-click branch from db3a74c to 4a36b0b Compare January 15, 2025 21:40
@drgrice1 drgrice1 changed the title Be more selective when prevent the click event on a solution or hint accordion. Prevent the click event on a solution or hint accordion button instead of the details. Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants