mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
Update jspsych-external-html.js
I found a minor bug on line 69. Error: if (trial.cont_key) { document.removeEventListener('keydown', key_listener); } Correct: if (trial.cont_key) { display_element.removeEventListener('keydown', key_listener); } Because of this, some eventListeners continue working after finishing this plugin.
This commit is contained in:
parent
6eb7ec21ac
commit
4919c90ab1
@ -66,7 +66,7 @@ jsPsych.plugins['external-html'] = (function() {
|
||||
var t0 = (new Date()).getTime();
|
||||
var finish = function() {
|
||||
if (trial.check_fn && !trial.check_fn(display_element)) { return };
|
||||
if (trial.cont_key) { document.removeEventListener('keydown', key_listener); }
|
||||
if (trial.cont_key) { display_element.removeEventListener('keydown', key_listener); }
|
||||
var trial_data = {
|
||||
rt: (new Date()).getTime() - t0,
|
||||
url: trial.url
|
||||
|
Loading…
Reference in New Issue
Block a user