From 8d739053e2e2092fa7136a1709c730407f770143 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 27 Nov 2011 16:32:35 +0100 Subject: fix IE8 error FS#2381 A trailing comma created an empty array item causing IE8 to choke. --- lib/scripts/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/scripts/editor.js') diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js index 2009ce6af..f36d446d5 100644 --- a/lib/scripts/editor.js +++ b/lib/scripts/editor.js @@ -61,9 +61,9 @@ var dw_editor = { jQuery.each([ ['larger', function(){dw_editor.sizeCtl(editor,100);}], ['smaller', function(){dw_editor.sizeCtl(editor,-100);}], - ['wrap', function(){dw_editor.toggleWrap(editor);}], + ['wrap', function(){dw_editor.toggleWrap(editor);}] ], function (_, img) { - jQuery(document.createElement('img')) + jQuery(document.createElement('IMG')) .attr('src', DOKU_BASE+'lib/images/' + img[0] + '.gif') .click(img[1]) .appendTo($ctl); -- cgit v1.2.3 From 29a277ba918a65400b1beb961d142772efc26897 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 27 Nov 2011 16:42:29 +0100 Subject: IE doesn't know indexOf for arrays FS#2381 this fixes another IE javascript problem in edit mode --- lib/scripts/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scripts/editor.js') diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js index f36d446d5..042e34608 100644 --- a/lib/scripts/editor.js +++ b/lib/scripts/editor.js @@ -130,7 +130,7 @@ var dw_editor = { * @param event e - the key press event object */ keyHandler: function(e){ - if([8, 13, 32].indexOf(e.keyCode) === -1) { + if(jQuery.inArray(e.keyCode,[8, 13, 32]) === -1) { return; } var selection = getSelection(this); -- cgit v1.2.3