mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
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
This commit is contained in:
parent
106f11343e
commit
e55c5b0669
@ -42,6 +42,10 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
// Add a keyboard event handler
|
// Add a keyboard event handler
|
||||||
domNode.addEventListener("keydown",function (event) {
|
domNode.addEventListener("keydown",function (event) {
|
||||||
if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {
|
if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {
|
||||||
|
var handled = false;
|
||||||
|
if(self.invokeActions(this,event)) {
|
||||||
|
handled = true;
|
||||||
|
}
|
||||||
self.dispatchMessage(event);
|
self.dispatchMessage(event);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user