edesiocs / ingatan

Automatically exported from code.google.com/p/ingatan
Other
0 stars 0 forks source link

If the continue action hotkey for an answer field is similar to the continue action hot key for the quiz window, skip action effectively occurs instead. #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a question that has a single simple text answer field.
2. Go into quiz mode.
3. With the answer field focussed, press Shift+Enter (this is the quiz window's 
continue hotkey)

What is the expected output? What do you see instead?
The user _should_ see the results screen which shows the correct answer and the 
marks awarded. Instead, the next question is shown.

This occurs because the continue action is called twice. Once for pressing 
enter (as enter is the continue action hotkey for the simple text answer field, 
and once for the quiz window's shift+enter hotkey).

Please use labels and text to provide additional information.

Original issue reported on code.google.com by tom.inga...@gmail.com on 21 Jul 2010 at 2:27

GoogleCodeExporter commented 9 years ago

Original comment by tom.inga...@gmail.com on 21 Jul 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Have added to all documentation of the `IAnswerField` interface to highlight 
this problem and how to avoid it.

For default answer fields, this was only a problem in the `AnsFieldSimpleText` 
answer field class, and has been solved by checking that `e.getModifiers() == 
0`, so that it really is just the enter key that triggers the `ContinueAction` 
from this source.

Original comment by tom.eve...@gmail.com on 22 Jul 2010 at 3:10