dom helper
This commit is contained in:
parent
ccc81312a1
commit
a57cdbd5b5
3 changed files with 18 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue