Koenig - Fixed error from plus menu when leaving editor

refs https://github.com/TryGhost/Ghost/issues/9724
- leaving the editor could result in the plus menu being removed from DOM before teardown has fully cleared up the event handlers resulting in an error being thrown in the mousemove handler where we assumed the element is present
This commit is contained in:
Kevin Ansfield 2018-07-25 15:47:44 +01:00
parent dd93b139c4
commit 8a747b1cc9
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ export default Component.extend({
// show the (+) button when the mouse is over a blank P tag
_handleMousemove(event) {
if (!this.showMenu) {
if (!this.showMenu && this.element) {
let {pageX, pageY} = event;
let editor = this.editor;