Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Find this solution and verified it fixed this issue on Chrome (solution from http://meta.stackoverflow.com/users/159266/dipesh-kc): http://meta.stackoverflow.com/questions/63307/blockquote-glitch-in-editor-in-chrome-6-and-7

We need to fix the file: askbot/skins/common/media/js/wmd/wmd.js

    @@ -21,6 +21,7 @@ Attacklab.wmdBase = function(){


    // Used to work around some browser bugs where we can't use feature testing.
+   global.isChrome = /chrome/.test(nav.userAgent.toLowerCase());
    global.isIE = /msie/.test(nav.userAgent.toLowerCase());
    global.isIE_5or6 = /msie 6/.test(nav.userAgent.toLowerCase()) || /msie 5/.test(nav.userAgent.toLowerCase());
    global.isIE_7plus = global.isIE && !global.isIE_5or6;
@@ -1599,6 +1600,11 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){
        var regexText;
        var replacementText;

+        // workaround for broken blockquote under Chrome.
+        if (global.isChrome) {
+            "X".match(/()./)
+        }
+
        this.selection = this.selection.replace(/(^\n*)/, "");
        this.startTag = this.startTag + re.$1;
        this.selection = this.selection.replace(/(\n*$)/, "");