From bda55fa7d9503a56c3fcef78b0516c541ee4b2e2 Mon Sep 17 00:00:00 2001 From: Joshua Duxbury Date: Wed, 8 Feb 2017 11:18:32 +0000 Subject: [PATCH] Fixed to work with all current versions of Jquery e.srcElement is null in higher jquery - Fix added --- MarkdownDeepJS/MarkdownDeepEditorUI.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MarkdownDeepJS/MarkdownDeepEditorUI.js b/MarkdownDeepJS/MarkdownDeepEditorUI.js index 0ec56c0..68a425a 100644 --- a/MarkdownDeepJS/MarkdownDeepEditorUI.js +++ b/MarkdownDeepJS/MarkdownDeepEditorUI.js @@ -78,7 +78,8 @@ var MarkdownDeepEditorUI=new function(){ this.onResizerMouseDown=function(e) { // Initialize state - var srcElement = (window.event) ? e.srcElement : e.target, + //e.srcElement is null in Jquery 3. This fixes issue. + var srcElement = (e.srcElement) ? e.srcElement : e.target, textarea = $(srcElement).closest('.mdd_resizer_wrap').prev('.mdd_editor_wrap').children("textarea")[0], iOriginalMouse = e.clientY, iOriginalHeight = $(textarea).height(); @@ -381,4 +382,4 @@ How the associated UI components are located: }); }; -})( jQuery ); \ No newline at end of file +})( jQuery );