Make WordPress Core

Ticket #29571: 29571.patch

File 29571.patch, 585 bytes (added by JoshuaGoodwin, 10 years ago)

A patch for qt.TagButton. wpLink and qt.insertContent() probably need changing too.

  • quicktags.js

     
    491491                                        canvas.value = l + i + t.tagStart + r; // insert self closing tags after the selection
    492492                                        cursorPos += t.tagStart.length;
    493493                                } else {
     494                                        if ( i.charAt(i.length - 1) === '\n' ) { // WebKit
     495                                                i = i.substring(0, i.length - 1);
     496                                                r = '\n' + r;
     497                                                cursorPos -= 1;
     498                                        }
    494499                                        canvas.value = l + t.tagStart + i + endTag + r;
    495500                                        cursorPos += t.tagStart.length + endTag.length;
    496501                                }