Mentions: Uncaught TypeError: clientRectFunctions.get(...) is not a function
See original GitHub issueWhen 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:
- Created 7 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.