Skip to content

Commit cdf65af

Browse files
committed
Add focus support.
1 parent 51d94c6 commit cdf65af

5 files changed

+8
-5
lines changed

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-front-matter-title-plugin",
33
"name": "Front Matter Title",
4-
"version": "3.8.3",
4+
"version": "3.8.4",
55
"minAppVersion": "0.16.3",
66
"description": "Lets you define a title in frontmatter to be displayed as the filename for explorer, graph, search and etc.",
77
"author": "Snezhig",

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-sample-plugin",
3-
"version": "3.8.3",
3+
"version": "3.8.4",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
66
"scripts": {

src/Utils/FakeTitleElementService.ts

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export default class FakeTitleElementService {
7777
element.className = original.className;
7878
element.setText(title);
7979
element.setAttribute(this.attr.fake, id);
80+
element.tabIndex = -1;
8081
original.setAttribute(this.attr.original, id);
8182
this.elements.set(id, { original, fake: element, events: [...events] });
8283

@@ -121,6 +122,7 @@ export default class FakeTitleElementService {
121122
if (this.has(id)) {
122123
const { fake, original } = this.elements.get(id);
123124
fake.addEventListener("click", this.events.click);
125+
fake.addEventListener("focus", this.events.click);
124126
original.addEventListener("blur", this.events.blur);
125127
}
126128
}

versions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@
5151
"3.8.0": "0.16.3",
5252
"3.8.1": "0.16.3",
5353
"3.8.2": "0.16.3",
54-
"3.8.3": "0.16.3"
54+
"3.8.3": "0.16.3",
55+
"3.8.4": "0.16.3"
5556
}

0 commit comments

Comments
 (0)