From e55c5b06697062c42d318ffed1d10ab366ff0851 Mon Sep 17 00:00:00 2001 From: jed Date: Mon, 26 Oct 2015 20:23:09 +0100 Subject: [PATCH] Let $keyboard trigger action-widgets Because of the refresh problems with the other widgets triggering action-widgets I am doing this one by itself. I hadn't included it before. This shouldn't have any more problems than the button widget does, and any problems caused by it should be fixed by any fix we use for the button widget. See #1564 for more background --- core/modules/widgets/keyboard.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/modules/widgets/keyboard.js b/core/modules/widgets/keyboard.js index 2eb392a75..004dddbd6 100644 --- a/core/modules/widgets/keyboard.js +++ b/core/modules/widgets/keyboard.js @@ -42,6 +42,10 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) { // Add a keyboard event handler domNode.addEventListener("keydown",function (event) { if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) { + var handled = false; + if(self.invokeActions(this,event)) { + handled = true; + } self.dispatchMessage(event); event.preventDefault(); event.stopPropagation();