mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
937607893c
For <p>1<br/>2</p>, selectNodes([2,2]) correctly returned the end of the first text node, but selectNodes([4,4]) returned index 2 in the paragraph (i.e. between the break node and the second text node). The correct behavior is to return the start of the second text node, i.e. the mirror image of the behavior for [2,2]. Fixed this by applying the startBetween/endBetween logic only if the relevant adjacent node is wrapped (or if it's missing). In the code, this is expressed as !(adjacent node present && adjacent node wrapped). Change-Id: Ie3b7fdf1de38ee253a798a7a73bc89734f4ca4fa |
||
---|---|---|
.. | ||
ce | ||
dm | ||
image.png | ||
index.html | ||
ve.BranchNode.test.js | ||
ve.Document.test.js | ||
ve.example.js | ||
ve.Factory.test.js | ||
ve.LeafNode.test.js | ||
ve.Node.test.js | ||
ve.qunit.js | ||
ve.Range.test.js | ||
ve.test.js |