Skip to content

Commit

Permalink
using elementIDMap to get the UL
Browse files Browse the repository at this point in the history
  • Loading branch information
HRankit authored and TunaYagci committed May 20, 2020
1 parent 0f7f955 commit b507626
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/MentionableTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
selection: '',
mode: this.modeIdentifiers[0].mode,
elementIdMap: new Map(),
selectedULID:'',
}
},
created() {
Expand All @@ -150,9 +149,6 @@
const uniqueId = uuid();
const newId = `${id}-${uniqueId}`;
this.elementIdMap.set(id, newId);
if (id === 'UL'){
this.selectedULID = newId;
}
return newId;
},
getSelectionStart() {
Expand Down Expand Up @@ -252,7 +248,7 @@
}
},
scrollSelectedIntoView() {
let parentUL = document.getElementById(this.selectedULID);
let parentUL = document.getElementById(this.elementIdMap.get('UL'));
let selected = parentUL.getElementsByClassName("active");
if (selected[0] != null) {
let oH = parentUL.offsetHeight;
Expand Down

0 comments on commit b507626

Please sign in to comment.