aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-08-10 10:23:37 +0900
committerGitHub <noreply@github.com>2020-08-10 10:23:37 +0900
commit0ceed69e532f62aa284a595579d825210cf8e69c (patch)
treeac337975cd42533213126690a98ee21479c77bc0
parent73b92dd1fc09d43f0d23e9ab9a37a7b224e2f5ae (diff)
parent41b1a9aabd05cd442977bcd4be7919806e7179a5 (diff)
Merge pull request #757 from MatiasStorm/Issue-#257
Added elements with attribute 'onclick' to hints
-rw-r--r--src/content/presenters/FollowPresenter.ts1
-rw-r--r--src/content/presenters/Hint.ts5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/content/presenters/FollowPresenter.ts b/src/content/presenters/FollowPresenter.ts
index 8aef819..e9105bc 100644
--- a/src/content/presenters/FollowPresenter.ts
+++ b/src/content/presenters/FollowPresenter.ts
@@ -11,6 +11,7 @@ const TARGET_SELECTOR = [
'[contenteditable=""]',
"[tabindex]",
'[role="button"]',
+ "[onclick]",
"summary",
].join(",");
diff --git a/src/content/presenters/Hint.ts b/src/content/presenters/Hint.ts
index 3f39060..8bf265b 100644
--- a/src/content/presenters/Hint.ts
+++ b/src/content/presenters/Hint.ts
@@ -119,7 +119,10 @@ export class InputHint extends Hint {
default:
if (doms.isContentEditable(target)) {
return target.focus();
- } else if (target.hasAttribute("tabindex")) {
+ } else if (
+ target.hasAttribute("tabindex") ||
+ target.hasAttribute("onclick")
+ ) {
return target.click();
}
}