dom helper

This commit is contained in:
Shin'ya Ueoka 2017-10-23 20:10:05 +09:00
parent ccc81312a1
commit a57cdbd5b5
3 changed files with 18 additions and 6 deletions

View file

@ -1,5 +1,6 @@
import messages from 'shared/messages';
import Hint from './hint';
import * as dom from 'shared/utils/dom';
const TARGET_SELECTOR = [
'a', 'button', 'input', 'textarea',
@ -136,8 +137,9 @@ export default class Follow {
case 'button':
return element.click();
default:
// it may contenteditable
return element.focus();
if (dom.isContentEditable(element)) {
return element.focus();
}
}
}