question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mentions: Uncaught TypeError: clientRectFunctions.get(...) is not a function

See original GitHub issue

When I try to use a mentionTrigger longer than 1 character, I start to get this error:

index.js:106 Uncaught TypeError: clientRectFunctions.get(...) is not a function
getPortalClientRect @ index.js:106
(anonymous function) @ index.js:77
MentionSuggestions._this.componentDidUpdate @ index.js:89
invokeComponentDidUpdateWithTimer @ ReactCompositeComponent.js:66
...

Steps to reproduce:

Set up a mentionTrigger of test,

    const mentionsPlugin = createMentionsPlugin({
        mentionTrigger: 'test'
    });

Then in the editor, type “test” and press backspace, which triggers the error.

This appears to be caused by the code in MentionSuggestions componentDidUpdate:

const decoratorRect = this.props.store.getPortalClientRect(this.activeOffsetKey);

It fails because this.activeOffsetKey is no longer in the store searches map. It was taken out from a prior call to the store’s unregister function when I hit backspace.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nikgrafcommented, Aug 28, 2016

Thanks for reporting @jameslk & @gfx. I’m quite busy right now. Does one of you have time to investigate & fix the issue? A Pull Request would be very welcome.

0reactions
stale[bot]commented, Sep 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >
Uncaught TypeError: $template.get is not a function
Please see my answer here. I fixed this bug by updating the html2element function to: html2element: function(html) { var $template, attributes = {} ......
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
jQuery fix for Uncaught TypeError is not a function error
Unfortunately I am getting the following error when I include my external script mentioned below: Uncaught TypeError: $ is not a function.
Read more >
CKEditor: Uncaught TypeError: undefined is not a function ...
I am new to CKEditor and trying to implement it in a PHP/HTML site I am working on. Currently when my page loads...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found