follow [tabindex]

the [tabindex] elements are used in gmail
jh-changes
Shin'ya Ueoka 7 years ago
parent a57cdbd5b5
commit 6b60d09ae2
  1. 4
      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();
}
}
}