Skip to content

Commit

Permalink
♻️ #13 hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Feb 17, 2019
1 parent 08bae70 commit 529b465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ts/hint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class Hint {
import(/* webpackChunkName: "vendors~vditor" */ '../emoji/allEmoji')
.then(allEmoji => {
let emojiHint = emojiKey === '' ? this.commonEmoji : allEmoji.allEmoji
let matchEmojiData: Array<any> = []
let matchEmojiData: Array<HintData> = []
Object.keys(emojiHint).forEach((key) => {
if (key.indexOf(emojiKey.toLowerCase()) === 0) {
if (emojiHint[key].indexOf('.') > -1) {
Expand Down
6 changes: 3 additions & 3 deletions src/ts/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export class Ui {
vditorElement.appendChild(vditor.resize.element)
}

document.onclick = (event: any) => {
const menuItem = event.target.closest('.vditor-tooltipped')
if (menuItem && menuItem.nextSibling && menuItem.nextSibling.className === 'vditor-panel') {
document.onclick = (event: Event) => {
const menuItem = (<HTMLElement>event.target).closest('.vditor-tooltipped')
if (menuItem && menuItem.nextSibling && (<HTMLElement>menuItem.nextSibling).className === 'vditor-panel') {
return
}
document.querySelectorAll('.vditor-hint').forEach((element: HTMLElement) => {
Expand Down

0 comments on commit 529b465

Please sign in to comment.