Permalink
Browse files

Fixed issue with Shift+A selecting all contents on Chrome.

  • Loading branch information...
1 parent 6798270 commit 5d7a7f87e22ea0a21d4e59f9079863d95551be68 @spocke spocke committed Jun 24, 2012
View
@@ -1,3 +1,5 @@
+Version 3.5.4.1 (2012-06-24)
+ Fixed issue with Shift+A selecting all contents on Chrome.
Version 3.5.4 (2012-06-21)
Added missing mouse events to HTML5 schema. Some events needs to be manually defined though since the spec is huge.
Added image resizing for WebKit browsers by faking the whole resize behavior.
@@ -834,7 +834,7 @@
function nodeChanged(ed, e) {
// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything
- if (e.keyCode != 65 || !tinymce.VK.modifierPressed(e)) {
+ if (e.keyCode != 65 || !tinymce.VK.metaKeyPressed(e)) {
self.selection.normalize();
}
@@ -175,7 +175,7 @@ tinymce.util.Quirks = function(editor) {
*/
function selectAll() {
editor.onKeyDown.add(function(editor, e) {
- if (e.keyCode == 65 && VK.modifierPressed(e)) {
+ if (e.keyCode == 65 && VK.metaKeyPressed(e)) {
e.preventDefault();
editor.execCommand('SelectAll');
}
@@ -26,6 +26,10 @@
modifierPressed: function (e) {
return e.shiftKey || e.ctrlKey || e.altKey;
@staabm

staabm Jun 24, 2012

Shouldn't the Mac metakey/ctrlkey Case also be added to this method?

@spocke

spocke Jun 24, 2012

Owner

Yes, maybe. However just fixing a critical issue now.

+ },
+
+ metaKeyPressed: function(e) {
+ return tinymce.isMac ? e.metaKey : e.ctrlKey;
}
};
})(tinymce);

0 comments on commit 5d7a7f8

Please sign in to comment.