mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-29 13:35:15 +00:00
Allow global keyboard shortcuts to work in framed editor (#6705)
Co-authored-by: Maurycy Zarzycki <maurycy@evidentlycube.com>
This commit is contained in:
@@ -198,6 +198,7 @@ Each entry in the events array is an object with these properties:
|
||||
handlerFunction: optional event handler function
|
||||
handlerObject: optional event handler object
|
||||
handlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)
|
||||
capture: optionally specifies the listener should use capture (defaults to `false`)
|
||||
*/
|
||||
exports.addEventListeners = function(domNode,events) {
|
||||
$tw.utils.each(events,function(eventInfo) {
|
||||
@@ -213,7 +214,7 @@ exports.addEventListeners = function(domNode,events) {
|
||||
handler = eventInfo.handlerObject;
|
||||
}
|
||||
}
|
||||
domNode.addEventListener(eventInfo.name,handler,false);
|
||||
domNode.addEventListener(eventInfo.name,handler,!!eventInfo.capture);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user