Browse Source

! temp work around for jumping cursor in FF

Signed-off-by: Spuds <[email protected]>
Spuds 12 years ago
parent
commit
dec567308e

+ 2 - 2
Themes/default/scripts/drafts.js

@@ -74,8 +74,8 @@ smf_DraftAutoSave.prototype.draftFocus = function(oEvent, source)
 // Make the call to save this draft in the background
 smf_DraftAutoSave.prototype.draftSave = function ()
 {
-	var sPostdata = $('#' + this.opt.sSceditorID).data("sceditor").getText();
-	
+	var sPostdata = $('#' + this.opt.sSceditorID).data("sceditor").getText(true);
+
 	// nothing to save or already posting or nothing changed?
 	if (isEmptyText(sPostdata) || smf_formSubmitted || this.sCheckDraft.localeCompare(sPostdata) == 0)
 		return false;

+ 3 - 2
Themes/default/scripts/jquery.sceditor.bbcode.js

@@ -410,8 +410,9 @@
 		 * @return string BBCode which has been converted from HTML
 		 * @memberOf jQuery.sceditorBBCodePlugin.prototype
 		 */
-		base.getHtmlHandler = function(html, domBody) {
-			$.sceditor.dom.removeWhiteSpace(domBody[0]);
+		base.getHtmlHandler = function(html, domBody, filter) {
+			if (typeof filter == 'undefined')
+				$.sceditor.dom.removeWhiteSpace(domBody[0]);
 
 			return $.trim(base.elementToBbcode(domBody));
 		};

+ 4 - 3
Themes/default/scripts/jquery.sceditor.js

@@ -1166,7 +1166,7 @@
 			html = $body.html();
 
 			if(filter !== false && base.options.getHtmlHandler)
-				html = base.options.getHtmlHandler(html, $body);
+				html = base.options.getHtmlHandler(html, $body, filter);
 
 			return html;
 		};
@@ -3411,12 +3411,13 @@
 				this.toggleTextMode();
 
 		},
-		getText: function() {
+		getText: function(filter) {
 			var current_value = '';
+			
 			if(this.inSourceMode())
 				current_value = this.getTextareaValue(false);
 			else
-				current_value = this.getWysiwygEditorValue();
+				current_value  = this.getWysiwygEditorValue(filter);
 
 			return current_value;
 		},