Closed hevilhuy closed 3 years ago
Ref: INT-2544
@hevilhuy I haven't seen this before so my best guess is that it is related to how the element is being disposed.
When in the element life-cycle is the error appearing? Do you have a small replication case that we can use to better understand the situation? Maybe a small github project?
I can share my live share to you. Do you use Discord?
This message is on production server.
Yeah, unfortunately, I only have a Mac available at the time and Visual Studio Mac doesn't support liveshare.
But the first error is definitely an issue with disposing of the element. The second screenshot looks like JS is trying to call the c# code and fails, so maybe is trying to reach out to it with the outdated reference?
Let me dig a bit more into it.
Please add me on Discord and we will discuss this. My Discord is Red Wei#2396
Just recently encountered this issue as well. I believe this happened when there are 2 or more instances of tinymce in the page. I did some digging with at least 2 instance of tinymce.
During the dispose process, destroy() method is called and successfully removed the first instance. Then destroy() is called again and also successfully removed the second one. However, after this, editor.on(blazorConf.modelEvents) is triggered, which in turn calls the update() method. update() method does use dotNetRef which is already gone at that time.
Just recently encountered this issue as well. I believe this happened when there are 2 or more instances of tinymce in the page. I did some digging with at least 2 instance of tinymce.
During the dispose process, destroy() method is called and successfully removed the first instance. Then destroy() is called again and also successfully removed the second one. However, after this, editor.on(blazorConf.modelEvents) is triggered, which in turn calls the update() method. update() method does use dotNetRef which is already gone at that time.
Việt Nam điểm danh!
Yeah, thanks to @hevilhuy I could work out a simple replication. Easiest way out is to just unbind all the events before disposing of the Editor to avoid that error
This should be fixed with #16
This error on occur in version 5. I tried to rollback to version 3 and everything is OK.