mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-04 22:40:28 +00:00
Merge branch 'master' into parameterised-transclusions
This commit is contained in:
commit
945c9e619a
@ -84,9 +84,6 @@ function FramedEngine(options) {
|
|||||||
// Copy the styles from the dummy textarea
|
// Copy the styles from the dummy textarea
|
||||||
this.copyStyles();
|
this.copyStyles();
|
||||||
// Add event listeners
|
// Add event listeners
|
||||||
$tw.utils.addEventListeners(this.iframeDoc, [
|
|
||||||
{name: "keydown",handlerObject: $tw.keyboardManager,handlerMethod: "handleKeydownEvent", capture: true},
|
|
||||||
]);
|
|
||||||
$tw.utils.addEventListeners(this.domNode,[
|
$tw.utils.addEventListeners(this.domNode,[
|
||||||
{name: "click",handlerObject: this,handlerMethod: "handleClickEvent"},
|
{name: "click",handlerObject: this,handlerMethod: "handleClickEvent"},
|
||||||
{name: "input",handlerObject: this,handlerMethod: "handleInputEvent"},
|
{name: "input",handlerObject: this,handlerMethod: "handleInputEvent"},
|
||||||
|
@ -198,7 +198,6 @@ Each entry in the events array is an object with these properties:
|
|||||||
handlerFunction: optional event handler function
|
handlerFunction: optional event handler function
|
||||||
handlerObject: optional event handler object
|
handlerObject: optional event handler object
|
||||||
handlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)
|
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) {
|
exports.addEventListeners = function(domNode,events) {
|
||||||
$tw.utils.each(events,function(eventInfo) {
|
$tw.utils.each(events,function(eventInfo) {
|
||||||
@ -214,7 +213,7 @@ exports.addEventListeners = function(domNode,events) {
|
|||||||
handler = eventInfo.handlerObject;
|
handler = eventInfo.handlerObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
domNode.addEventListener(eventInfo.name,handler,!!eventInfo.capture);
|
domNode.addEventListener(eventInfo.name,handler,false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user