mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Add a warning for undo/redo buttons in Firefox
This commit is contained in:
parent
3b49cd17fc
commit
3e9cc3e8fd
@ -194,14 +194,24 @@ FramedEngine.prototype.executeTextOperation = function(operation) {
|
||||
Execute a command
|
||||
*/
|
||||
FramedEngine.prototype.execCommand = function(command) {
|
||||
var isFirefox = !!document.mozFullScreenEnabled,
|
||||
msg = "Warning: the '" + command + "' button does not work in Firefox without installing the CodeMirror plugin.\n\n(Standard operating system keyboard shortcuts will work correctly)";
|
||||
this.iframeNode.focus();
|
||||
this.domNode.focus();
|
||||
switch(command) {
|
||||
case "undo":
|
||||
if(isFirefox) {
|
||||
alert(msg);
|
||||
} else {
|
||||
this.iframeDoc.execCommand("undo", false, null);
|
||||
}
|
||||
break;
|
||||
case "redo":
|
||||
if(isFirefox) {
|
||||
alert(msg);
|
||||
} else {
|
||||
this.iframeDoc.execCommand("redo", false, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user