jenkins-bot has submitted this change and it was merged.
Change subject: Make returning the same offset the least preferred option in
ve.ce.Document.getRelativeOffset
......................................................................
Make returning the same offset the least preferred option in
ve.ce.Document.getRelativeOffset
Change-Id: If21cdea220b58aec92b8735e92f594d8c16c8f6f
---
M modules/ve/ce/ve.ce.Document.js
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ce/ve.ce.Document.js b/modules/ve/ce/ve.ce.Document.js
index 120571a..f14b910 100644
--- a/modules/ve/ce/ve.ce.Document.js
+++ b/modules/ve/ce/ve.ce.Document.js
@@ -94,7 +94,10 @@
// Check if we've moved into a slug
if ( !!this.getSlugAtOffset( relativeStructuralOffset ) ) {
// Check if the relative content offset is in the
opposite direction we are trying to go
- if ( ( relativeContentOffset - offset < 0 ? -1 : 1 )
!== bias ) {
+ if (
+ relativeContentOffset === offset ||
+ ( relativeContentOffset - offset < 0 ? -1 : 1 )
!== bias
+ ) {
// There's nothing past the slug we are already
in, stay in it
return relativeStructuralOffset;
}
--
To view, visit https://gerrit.wikimedia.org/r/59331
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If21cdea220b58aec92b8735e92f594d8c16c8f6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits