Merge pull request #432 from Mange/follow-details-summary

Allow following <summary> elements
This commit is contained in:
Shin'ya Ueoka 2018-07-29 13:25:47 +09:00 committed by GitHub
commit 85e9b9da37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View file

@ -5,7 +5,7 @@ import * as dom from 'shared/utils/dom';
const TARGET_SELECTOR = [
'a', 'button', 'input', 'textarea', 'area',
'[contenteditable=true]', '[contenteditable=""]', '[tabindex]',
'[role="button"]'
'[role="button"]', 'summary'
].join(',');
@ -155,6 +155,7 @@ export default class Follow {
case 'textarea':
return element.focus();
case 'button':
case 'summary':
return element.click();
default:
if (dom.isContentEditable(element)) {