mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Fix bug in ListButtilTool - cursor position was adjusted when it shouldn't be
This commit is contained in:
parent
f55bd4b77c
commit
bc4fc1249c
|
@ -57,12 +57,12 @@ es.ListButtonTool.prototype.list = function( nodes, style ) {
|
|||
if( stack.length > 0 ) {
|
||||
stacks.push( stack );
|
||||
}
|
||||
|
||||
if ( selection.from === selection.to ) {
|
||||
selection.from += 2;
|
||||
selection.to += 2;
|
||||
} else {
|
||||
if ( stacks.length > 0 ) {
|
||||
|
||||
if ( stacks.length > 0 ) {
|
||||
if ( selection.from === selection.to ) {
|
||||
selection.from += 2;
|
||||
selection.to += 2;
|
||||
} else {
|
||||
if ( nodes[0].getParent().getElementType() != 'listItem' ) {
|
||||
if ( selection.from < selection.to ) {
|
||||
selection.from += 2;
|
||||
|
|
Loading…
Reference in a new issue