From 063219bbce2103c39ac98b3f528b242d84753c13 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Fri, 27 Feb 2015 12:54:29 -0500 Subject: [PATCH] Trigger renumbering when deleting (via cut) the first item of a list Fixes #2514. --- src/static/js/ace2_inner.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 4b84e784d..15747249d 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3313,6 +3313,14 @@ function Ace2Inner(){ return [rep.lines.offsetOfIndex(lineRange[0]), rep.lines.offsetOfIndex(lineRange[1])]; } + function handleCut(evt) + { + inCallStackIfNecessary("handleCut", function() + { + doDeleteKey(evt); + }); + } + function handleClick(evt) { inCallStackIfNecessary("handleClick", function() @@ -4854,6 +4862,7 @@ function Ace2Inner(){ $(document).on("keypress", handleKeyEvent); $(document).on("keyup", handleKeyEvent); $(document).on("click", handleClick); + $(document).on("cut", handleCut); $(root).on("blur", handleBlur); if (browser.msie) {