Skip to content

Commit

Permalink
Version 1.0.11
Browse files Browse the repository at this point in the history
1. Fix bubbling keydown events to parent to make global keyboard shortcuts workable. (#16)
  • Loading branch information
nuthrash committed Nov 11, 2023
1 parent 96b8b62 commit da5fdbb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-html-plugin",
"name": "HTML Reader",
"version": "1.0.10",
"version": "1.0.11",
"minAppVersion": "0.15.3",
"description": "This is a HTML file reader plugin for Obsidian. Can open document with \".html\" and \".htm\" file extensions.",
"author": "Nuthrash",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-html-plugin",
"version": "1.0.10",
"version": "1.0.11",
"description": "This is a HTML file reader plugin for Obsidian. Can open document with \".html\" and \".htm\" file extensions.",
"main": "main.js",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions src/HtmlView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ export class HtmlView extends FileView {

await restoreStateBySettings( iframe.contentWindow.document, iframe.mainView.settings );
buildUserInteractiveFacilities( iframe.mainView );

// bubble iframe's 'keydown' event to parent (issue #16)
iframe.contentWindow.addEventListener( 'keydown', (evt) => {
iframe.dispatchEvent( new evt.constructor(evt.type, evt) );
}, false );
};

dispatchEvent(new CustomEvent("DOMContentLoaded"));
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"1.0.7": "0.15.0",
"1.0.8": "0.15.3",
"1.0.9": "0.15.3",
"1.0.10": "0.15.3"
"1.0.10": "0.15.3",
"1.0.11": "0.15.3"
}

0 comments on commit da5fdbb

Please sign in to comment.