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

Only hide feedback if Fill in Blank is readonly #806

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

Conversation

JdenHartog
Copy link
Contributor

Only hide the feedbackTxt if Fill in Blank <input> element has attribute readonly.
This prevents the feedbackTxt from disappearing when one shift-tabs focus on the correct or shown answer in the <input> element and does a keypress.

I also added the readonly attribute to the <input> element if the show answer button is pressed.

Only hide the feedbackTxt if *Fill in Blank* `<input>` element has attribute `readonly`.
This prevents the feedbackTxt from disappearing when one shift-tabs focus on the *correct* or *shown answer* in the `<input>` element and does a keypress.

I also added the `readonly` attribute  to the `<input>` element if the show answer button is pressed.
@torinfo
Copy link
Collaborator

torinfo commented Oct 29, 2018

@JdenHartog Also needs some verification, because I don't immediately see the consequences of this change.

@JdenHartog
Copy link
Contributor Author

@torinfo I put two Xerte project containing only one Gap Fill online:
One without the fix (the current situation): without Fix
And one with the Fix in this pull request changed in file \offline\gapFill.js : with Fix
For both please try the following:

  • type "two" in the gap

  • hit Check button ("two" will turn green)

  • press shift-tab twice to select the word "two"

  • press any key and the feedback text will disappear (in the without Fix version ;-)

  • reload page

  • type "wrong" in the gap

  • hit Check button twice (Show Answers button will appear)

  • hit Show Answers button ("two" will turn orange)

  • press shift-tab three times to select the word "two"

  • press any character and the shown answer will change (in the without Fix version ;-)

  • also the feedback text will disappear (in the without Fix version ;-)

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