summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/media/js/post.js2
-rw-r--r--askbot/media/js/wmd/wmd.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/askbot/media/js/post.js b/askbot/media/js/post.js
index 7f9e3d42..4d63559c 100644
--- a/askbot/media/js/post.js
+++ b/askbot/media/js/post.js
@@ -2580,7 +2580,7 @@ FoldedEditor.prototype.getEditorInputId = function() {
FoldedEditor.prototype.onAfterOpenHandler = function() {
var editor = this.getEditor();
if (editor) {
- setTimeout(editor.focus(), 500);
+ setTimeout(function() {editor.focus()}, 500);
}
};
diff --git a/askbot/media/js/wmd/wmd.js b/askbot/media/js/wmd/wmd.js
index 35a571e5..09e11371 100644
--- a/askbot/media/js/wmd/wmd.js
+++ b/askbot/media/js/wmd/wmd.js
@@ -1912,7 +1912,7 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){
if (start_now){
loadListener();
} else {
- util.addEvent(top, "load", loadListener);
+ util.addEvent(window, "load", loadListener);
}
};
@@ -2490,7 +2490,7 @@ if (askbot['settings']['editorType'] == 'markdown' && !Attacklab.wmd) {
mergeEnv(Attacklab.wmd_defaults);
mergeEnv(Attacklab.account_options);
- mergeEnv(top["wmd_options"]);
+ mergeEnv(window["wmd_options"]);
Attacklab.full = true;
var defaultButtons = "bold italic link blockquote code image attachment ol ul heading hr";