jenkins-bot has submitted this change and it was merged. Change subject: Remove native KeyEvent ......................................................................
Remove native KeyEvent Relying on any native implementation of window.KeyEvent is unreliable. The two specs listed in the comments for this method are not the same and Firefox now has DOM_VK_ENTER and DOM_VK_RETURN which are equivalent to 13 and 14 respectively. The key on the right side of my home row triggers 14 using native window.KeyEvent in Firefox, where Chrome uses our defined constants and returns 13. This fix ensures the same values for all browsers. Change-Id: I12b2f5d674bdf13526577cb81d0505b608f2846c --- M modules/ve/ve.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve/ve.js b/modules/ve/ve.js index 57cfc5d..9e87e29 100644 --- a/modules/ve/ve.js +++ b/modules/ve/ve.js @@ -1157,7 +1157,7 @@ // Based on the KeyEvent DOM Level 3 (add more as you need them) // http://www.w3.org/TR/2001/WD-DOM-Level-3-Events-20010410/DOM3-Events.html#events-Events-KeyEvent // http://www.w3.org/TR/2000/WD-DOM-Level-3-Events-20000901/events.html - ve.Keys = window.KeyEvent || { + ve.Keys = { 'DOM_VK_UNDEFINED': 0x0, 'DOM_VK_RIGHT_ALT': 0x12, 'DOM_VK_LEFT_ALT ': 0x12, -- To view, visit https://gerrit.wikimedia.org/r/64978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12b2f5d674bdf13526577cb81d0505b608f2846c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Christian <christ...@wikia-inc.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits