Commits

Mike Cannon-Brookes committed 0b9df68 Merge

Comments (0)

Files changed (2)

+bcbea9aff3a6f401a58293d5c396246fd20ea655 1_0

js/inlinereply/main.js

 var $ = require('speakeasy/jquery').jQuery;
 
 function setupInlineReplies() {
+	var placeholderText = 'Quick reply...';
 	jQuery("li.action-reply-comment a").each(function(i) {  
 	    commentId = jQuery(this).attr('id');
 		commentId = commentId.substring(commentId.indexOf('ment-') + 5);
 
-		jQuery(this).parent().after("<li><input type='text' name='" + commentId + "' style='font-size: 0.8em; color: #ccc;' size='50' class='inlinereply' value='Quick reply...'></li>");
+		jQuery(this).parent().after("<li><input type='text' name='" + commentId + "' style='font-size: 0.8em; color: #ccc;' size='50' class='inlinereply' value='" + placeholderText + "'></li>");
 	});
 
 	jQuery('.inlinereply').click(function() { 
 	    el = jQuery(this);
-	    el.val(''); 
+	    if (el.val() == placeholderText)
+	    {
+	        el.val(''); 
+	    }
 	    el.css('color', 'black');
 
 	    el.keypress(function(e) {