From 5a698bc2b4e477bdb2f9994891352fec4fa511f1 Mon Sep 17 00:00:00 2001 From: jous Date: Wed, 9 Jan 2013 15:44:46 +0200 Subject: [PATCH] moved unbinding to an existing element --- js/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index 2058d6467b..fd43b6b76b 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1320,9 +1320,9 @@ AJAX.registerTeardown('functions.js', function() { if (codemirror_inline_editor) { // Copy the sql query to the text area to preserve it. $('#sql_query_edit').text(codemirror_inline_editor.getValue()); + $(codemirror_inline_editor.getWrapperElement()).unbind('keydown'); codemirror_inline_editor.toTextArea(); codemirror_inline_editor = false; - $(codemirror_inline_editor.getWrapperElement()).unbind('keydown'); } if (codemirror_editor) { $(codemirror_editor.getWrapperElement()).unbind('keydown');