Closed kennsippell closed 10 months ago
It looks like that code was moved in this commit: https://github.com/enketo/enketo-core/commit/fd21204caab56250c70c08de698f82a693480179
Which means essentially the same code still exists in master
: https://github.com/enketo/enketo-core/blob/030497118b2fc90a1aed94c2758298ede026147c/src/widget/number-input/number-input.js#L157
I can see some reports that the key
is undefined
on keydown
events on mobile but if that were the case I would expect this error to be much more widespread.
@kennsippell Has anyone been able to reproduce the error? I'm particularly interested in if this is severe (eg: user cannot complete the form) or if it's just generating the feedback doc in the background.
Here is some more info about severity:
The error looks like a keydown
event is being fired without an event.key
property (stating the obvious...). This value can be undefined if the key can't be identified: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
It's possible your e2e test is sending an invalid or unusual key press to the input which the browser doesn't know causing this issue. This would make it less likely but not impossible to reproduce in a real browser.
Enketo core should be updated to protect against this.
Issue raised upstream: enketo/enketo#34
The upstream issue is fixed and released in enketo-core v7.2.4.
Leaving this open until we update enketo-core.
Enketo has been uplifted and I noted that:
confirm the upgrade fixes the bugs mentioned in cht-core#8102
Closing!
The function
_isNotPrintableKey
from top of stack is (was?) present in enketo-core https://github.com/enketo/enketo-core/blob/827c1f30a62d7e8a9093f7c9b1dac7b2b54151b4/src/js/mask.js#L412 instances of this in production moh-mali-chw running cht-core 4.0.1 cc @jkuester