# Clicking "Mention" not working correctly on first load

**URL:** <https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850>\
**Category:** Issues\
**Tags:** cheogram-www\
**Created:** [October 20, 2026, 2:48pm UTC](https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850 "2026-10-20T14:48:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnafuthegreat](https://hub.soprani.ca/user_avatar/hub.soprani.ca/gnafuthegreat/32/17_2.png) [@gnafuthegreat](https://hub.soprani.ca/u/gnafuthegreat)\
**Post date:** [October 20, 2026, 2:48pm UTC](https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850/1 "2026-10-20T14:48:55Z")

</div>

When clicking on an avatar and clicking “Mention” the nickname should be populated in the input box, but it only inserts ": " when the application is first loaded. If you type @ in the input box to bring up the list and then go back to clicking Mention, names are populated as expected.

---

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [October 25, 2026, 10:48pm UTC](https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850/2 "2026-10-25T22:48:06Z")

</div>

> <https://github.com/quill-mention/quill-mention/pull/427>
>
> Fixes #403
> 
> This PR resolves a regression where calling \`insertItem()\` program…matically fails unless a mention has already been manually inserted by the user.
> 
> The root cause is that \`mentionCharPos\` and \`cursorPos\` are only initialized during the manual mention flow. When \`insertItem()\` is called directly (e.g., via \`quill.getModule('mention').insertItem(...)\`), and no mentions have been typed yet, these required positions remain undefined — causing the method to bail early.
> 
> This change ensures default values for \`mentionCharPos\` and \`cursorPos\` are set when missing, allowing programmatic mentions to insert reliably even when no prior manual mention has occurred.
> 
> Includes updated build artifacts to reflect the fix.

---

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [November 17, 2026, 3:22pm UTC](https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850/3 "2026-11-17T15:22:41Z")

</div>



---

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [November 17, 2026, 3:50pm UTC](https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850/4 "2026-11-17T15:50:41Z")

</div>

merged this pr in a fork and moved to that for now

---

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [November 17, 2026, 3:50pm UTC](https://hub.soprani.ca/t/clicking-mention-not-working-correctly-on-first-load/850/5 "2026-11-17T15:50:48Z")

</div>


