diff --git a/APPL/MLD/mld_show_note2.asp b/APPL/MLD/mld_show_note2.asp index 3d7f20818c..32584fc6b0 100644 --- a/APPL/MLD/mld_show_note2.asp +++ b/APPL/MLD/mld_show_note2.asp @@ -156,14 +156,23 @@ var timestamp_notes = new Date(); var note_key = <%=note_key%>; $(function () { - $('textarea').autogrow(); - // Let op: scrollen is complexer dan je denkt. Ons huidige document heeft - // helemaal geen scrollbars, die zijn van de parent-IFrame! - <% if (!verynew && getQParamInt("autoscroll", 0) == 1) { %> - window.setTimeout(function() { $('#note').focus(); }, 1); - window.setTimeout('parent.scrollBy(0,$(\'#note\').height() + $(\'#note_submit\').height())', 1); - <% } %> + + $('textarea').autogrow(); + // Let op: scrollen is complexer dan je denkt. Ons huidige document heeft + // helemaal geen scrollbars, die zijn van de parent-IFrame! + <% if (!verynew && getQParamInt("autoscroll", 0) == 1) { %> + window.setTimeout(function() { $('#note').focus(); }, 1); + window.setTimeout('parent.scrollBy(0,$(\'#note\').height() + $(\'#note_submit\').height())', 1); + <% } %> + window.noteediting = false; + $(window).on("beforeunload", function(){ + if (window.noteediting) + { + FcltMgr.stopEdit(window); + } + }); + $("#note").keyup(function () { if (note_key == -1 && $("#note").val() == "" && window.noteediting)