ErwinHaasnoot / QRTEngine

Qualtrics Reaction Time Engine (QRTEngine) is an extension to Qualtrics which allows researchers, but generally any who are interested, to easily build behavioural online experiments.
16 stars 1 forks source link

e.path is undefined #36

Closed stephensrmmartin closed 9 years ago

stephensrmmartin commented 9 years ago

In the v16 qrtengine script, line 1172, e.path is undefined, and the stimulus presentation will fail.

I assume this only occurs when you use images, which I am.

As far as I can tell, event.path is not a standard method or variable defined by jquery, prototype, or HTML5.

ErwinHaasnoot commented 9 years ago

Hi Stephen,

Thanks for figuring this out. I assume this is the faulty line: https://github.com/ErwinHaasnoot/QRTEngine/blob/master/lib/QRTEngine.js#L695

This seems to be a Chrome-only attribute, which I've never realized. I've got a fix in mind, but I'll need to find some time to test it first. It'd simply be replacing e.path[0], with e.target.

Thanks again!

Best,

Erwin

stephensrmmartin commented 9 years ago

Hi Stephen,

Thanks for figuring this out. I assume this is the faulty line: https://github.com/ErwinHaasnoot/QRTEngine/blob/master/lib/QRTEngine.js#L695

This seems to be a Chrome-only attribute, which I've never realized. I've got a fix in mind, but I'll need to find some time to test it first. It'd simply be replacing e.path[0], with e.target.

Thanks again!

Best,

Erwin

— Reply to this email directly or view it on GitHub https://github.com/ErwinHaasnoot/QRTEngine/issues/36#issuecomment-135657304.

Does QRTEngine use jquery or does it use prototype? I see that event.target is a jquery thing, but I thought qualtrics was transitioning over to primarily using prototype?

ErwinHaasnoot commented 9 years ago

QRTEngine uses prototype. However, event.target is in the DOM spec: https://developer.mozilla.org/en-US/docs/Web/API/Event/target

stephensrmmartin commented 9 years ago

Ah, I apologize. I did not see that. Thanks for the responses!

--Stephen

QRTEngine uses prototype. However, event.target is in the DOM spec: https://developer.mozilla.org/en-US/docs/Web/API/Event/target

— Reply to this email directly or view it on GitHub https://github.com/ErwinHaasnoot/QRTEngine/issues/36#issuecomment-135786919.

stephensrmmartin commented 9 years ago

Just so you know, e.target seems to work fine. At least, the task itself is working. I do not know if this affects data storage or not.

ErwinHaasnoot commented 9 years ago

This should be fixed in the next version.