From: David ‘Bombe’ Roden Date: Sun, 22 Sep 2013 19:53:06 +0000 (+0200) Subject: Fix jQuery selectors for locating the reply input field. X-Git-Tag: 0.8.7^2~8 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9f68a59acb70b7d3133692acec937d481cb1487c;p=Sone.git Fix jQuery selectors for locating the reply input field. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 598c408..6c7f77c 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -75,7 +75,7 @@ function addCommentLink(postId, author, element, insertAfterThisElement) { replyElement.removeClass("hidden"); replyElement.removeClass("light"); (function(replyElement) { - replyElement.find("input.reply-input").blur(function() { + replyElement.find(":input.reply-input").blur(function() { if ($(this).hasClass("default")) { replyElement.addClass("light"); } @@ -83,7 +83,7 @@ function addCommentLink(postId, author, element, insertAfterThisElement) { replyElement.removeClass("light"); }); })(replyElement); - textArea = replyElement.find("input.reply-input").focus().data("textarea"); + textArea = replyElement.find(":input.reply-input").focus().data("textarea"); if (author != getCurrentSoneId()) { textArea.val(textArea.val() + "@sone://" + author + " "); } @@ -813,7 +813,7 @@ function ajaxifyPost(postElement) { /* ajaxify author/post links */ $(".post-status-line .permalink a", postElement).click(function() { if (!$(".create-reply", postElement).hasClass("hidden")) { - textArea = $("input.reply-input", postElement).focus().data("textarea"); + textArea = $(":input.reply-input", postElement).focus().data("textarea"); $(textArea).replaceSelection($(this).attr("href")); } return false; @@ -832,7 +832,7 @@ function ajaxifyPost(postElement) { /* process reply input fields. */ getTranslation("WebInterface.DefaultText.Reply", function(text) { - $(postElement).find("input.reply-input").each(function() { + $(postElement).find(":input.reply-input").each(function() { registerInputTextareaSwap(this, text, "text", false, false); }); }); @@ -935,7 +935,7 @@ function ajaxifyReply(replyElement) { /* ajaxify author links */ $(".reply-status-line .permalink a", replyElement).click(function() { if (!$(".create-reply", getPostElement(replyElement)).hasClass("hidden")) { - textArea = $("input.reply-input", getPostElement(replyElement)).focus().data("textarea"); + textArea = $(":input.reply-input", getPostElement(replyElement)).focus().data("textarea"); $(textArea).replaceSelection($(this).attr("href")); } return false;