I'm sorry I don't have a clear reproduction technique yet, however... I've seen this a few times sporadically now.
I believe the error occurs when the Froala editor is supposed to already be cleaned up, and then later I do a window resize.
I'm on master (b14d290d8b1b9ed1e4bcaf56326fc201f7da9d41)
Uncaught TypeError: Cannot read property 'find' of null


Any ideas?
Do you have any editor instance that was not destroyed, but it was removed from the DOM?
I kind of solved this issue for me (I use the angular-froala port)
The problem there is, that when the controller $destroy event is emitted, the DOM has already changed. That's why my froalaEditor('destroy') call does not work
my solution is simply to add an event listener for the $stateChangeStart event and manually destroy the editor there - in that way, the destroy event is sometimes called twice but IMO that's better than a memory leak
This still occurs for me.
The scenario is the following:
I got an open editor on a page, open a popup where another editor is present.
If I now close the popup and resize my browser window, I get this error Uncaught TypeError: Cannot read property 'find' of null
@cfey would it be possible to make a jsFiddle? Thanks.
I couldn't reproduce it there :/
Anyway I monkey patched it
I added to the line t.$tb.html("").removeData().remove(), t.$tb = null the command e(t.o_win).unbind("resize", i)
Somehow the resize listener gets called even after this line t.$tb.html("").removeData().remove(), t.$tb = null was executed
strange...
Do you have any editor instance that was not destroyed, but it was removed from the DOM?
Great question. It turns out I had this window resize error in my app in multiple places. The first case seems to have been me not properly cleaning up the editor.
However the second case seems like an issue with Froala when I have two instances and clean one up. Here's how to reproduce: