Skip to content

Fix: Start Quiz button unhides questionset#122

Open
ymdahi wants to merge 1 commit into
h5p:masterfrom
ymdahi:ymdahi-fix-startbutton
Open

Fix: Start Quiz button unhides questionset#122
ymdahi wants to merge 1 commit into
h5p:masterfrom
ymdahi:ymdahi-fix-startbutton

Conversation

@ymdahi
Copy link
Copy Markdown

@ymdahi ymdahi commented Apr 17, 2023

Addresses #121

  • .show() is not adequetly handling unhide event when "Start Quiz" button is clicked.
  • The class .hidden never is removed from .questionset, meaning the questions are never displayed.

This patch:

  • uses removeClass jQuery method to remove the .hidden class
  • removes the .show() method from click and keydown events for .qs-startbutton

Tested on v1.20.11

@otacke
Copy link
Copy Markdown
Contributor

otacke commented Apr 18, 2023

@ymdahi It seems to be your site's custom stylesheet that is causing the problems.

You're setting .hidden { display: none !important; }. Using !important is a code smell anyway, and here it's preventing jQuery's show() from removing the regular display value. Cmp. https://api.jquery.com/show/

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