aboutsummaryrefslogtreecommitdiff
path: root/src/content/components/common
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-23 20:40:09 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-23 20:40:09 +0900
commit6b60d09ae2c3151a456341f454e1009da69062c3 (patch)
tree9dd1808a427b4dde9165a5c747581f2a61b72d56 /src/content/components/common
parenta57cdbd5b5f4efa94ecc61498fdb4039276f86f0 (diff)
follow [tabindex]
the [tabindex] elements are used in gmail
Diffstat (limited to 'src/content/components/common')
-rw-r--r--src/content/components/common/follow.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content/components/common/follow.js b/src/content/components/common/follow.js
index ce3d19c..65e0af9 100644
--- a/src/content/components/common/follow.js
+++ b/src/content/components/common/follow.js
@@ -4,7 +4,7 @@ import * as dom from 'shared/utils/dom';
const TARGET_SELECTOR = [
'a', 'button', 'input', 'textarea',
- '[contenteditable=true]', '[contenteditable=""]'
+ '[contenteditable=true]', '[contenteditable=""]', '[tabindex]'
].join(',');
const inViewport = (win, element, viewSize, framePosition) => {
@@ -139,6 +139,8 @@ export default class Follow {
default:
if (dom.isContentEditable(element)) {
return element.focus();
+ } else if (element.hasAttribute('tabindex')) {
+ return element.click();
}
}
}