Editor quickTags: when the user selects some text by triple-clicking, then wraps it in a tag, and the last selected char is `\n`, insert the closing tag before the line break.
Props JoshuaGoodwin azaozz. Fixes #29571. Built from https://develop.svn.wordpress.org/trunk@37661 git-svn-id: http://core.svn.wordpress.org/trunk@37627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
14336f242a
commit
17eef2deeb
|
@ -526,6 +526,11 @@ function edButton(id, display, tagStart, tagEnd, access) {
|
|||
} else if ( canvas.selectionStart || canvas.selectionStart === 0 ) { // FF, WebKit, Opera
|
||||
startPos = canvas.selectionStart;
|
||||
endPos = canvas.selectionEnd;
|
||||
|
||||
if ( startPos < endPos && v.charAt( endPos - 1 ) === '\n' ) {
|
||||
endPos -= 1;
|
||||
}
|
||||
|
||||
cursorPos = endPos;
|
||||
scrollTop = canvas.scrollTop;
|
||||
l = v.substring(0, startPos); // left of the selection
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37660';
|
||||
$wp_version = '4.6-alpha-37661';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue