[Pkg-mozext-commits] [firebug] 10/35: Issue 7382: In HTML edit mode, Ctrl+Z clears the editor contents
David Prévot
taffit at moszumanska.debian.org
Sat May 24 14:54:27 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 1a71b50e23bc611bdaac758261acb1e0d68fe4b1
Author: Jan Odvarko <odvarko at gmail.com>
Date: Wed May 21 13:48:29 2014 +0200
Issue 7382: In HTML edit mode, Ctrl+Z clears the editor contents
---
extension/content/firebug/css/styleSheetEditor.js | 4 ++++
extension/content/firebug/editor/sourceEditor.js | 7 +++++++
extension/content/firebug/html/htmlEditor.js | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/extension/content/firebug/css/styleSheetEditor.js b/extension/content/firebug/css/styleSheetEditor.js
index cc26a98..8559ec8 100644
--- a/extension/content/firebug/css/styleSheetEditor.js
+++ b/extension/content/firebug/css/styleSheetEditor.js
@@ -75,6 +75,10 @@ StyleSheetEditor.prototype = domplate(BaseEditor,
// match CSSModule.getEditorOptionKey
var command = Firebug.chrome.$("cmd_firebug_togglecssEditMode");
command.setAttribute("checked", true);
+
+ // Clear undo history in the editor (Ctrl+Z should do nothing at the
+ // beginning, see also issue 7382);
+ this.editor.clearHistory();
},
hide: function()
diff --git a/extension/content/firebug/editor/sourceEditor.js b/extension/content/firebug/editor/sourceEditor.js
index 40e2dcd..c8df204 100644
--- a/extension/content/firebug/editor/sourceEditor.js
+++ b/extension/content/firebug/editor/sourceEditor.js
@@ -552,6 +552,13 @@ SourceEditor.prototype =
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ clearHistory: function()
+ {
+ this.editorObject.clearHistory();
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// CodeMirror internals
getDocument: function()
diff --git a/extension/content/firebug/html/htmlEditor.js b/extension/content/firebug/html/htmlEditor.js
index dddf90b..d4fa624 100644
--- a/extension/content/firebug/html/htmlEditor.js
+++ b/extension/content/firebug/html/htmlEditor.js
@@ -121,6 +121,10 @@ HTMLEditor.prototype = domplate(BaseEditor,
var command = Firebug.chrome.$("cmd_firebug_toggleHTMLEditing");
command.setAttribute("checked", true);
+
+ // Clear undo history in the editor (Ctrl+Z should do nothing at the
+ // beginning, see also issue 7382);
+ this.editor.clearHistory();
},
hide: function()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list