🤸‍♀️🤸‍♀️🤸‍♀️ SOLVED it! Finally figured out the @mention feature

I tried using a div instead of a ul-li element but that didnt work.Tried using a select element that is focusable but also didn't quite work in terms of the enter key repeating the username.

Tried a different approach inspired by the ternary conditional. Used a function to listen to the tooltip list, if it's visible, then switch on the text insert function. And it worked!!!

listenEnter() {
const visibleList = document.getElementById("usernamesList").style.visibility;
if (visibleList === "visible") {
return this.onEnter();
} else {
return null;
}
},

https://codepen.io/jasonleow/pen/eYBERMV

Now for the last part haha.. autocomplete search through username list as the user types...😫
Jason Leow Author

@Mostdefkima3ff thank you! It's definitely coming together now. Almost…there…

0 Likes

I seriously commend you for pushing through with this super difficult task. Kudos for your progress thus far :)

0 Likes

Please sign in to leave a comment.