mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
Fix for incorrect usage of ve.Range
Properties "from" and "to" of ve.Range should be used when direction of the range is important. Change-Id: I73f27abf5c90f9aad8fdd0622f71b09188af9486
This commit is contained in:
parent
e9b8021bf3
commit
c021445649
|
@ -1074,8 +1074,8 @@ ve.ce.Surface.prototype.showSelection = function ( range ) {
|
|||
// Ensure the range we are asking to select is from and to correct offsets - failure to do so
|
||||
// may cause getNodeAndOffset to throw an exception
|
||||
range = new ve.Range(
|
||||
this.getNearestCorrectOffset( range.start ),
|
||||
this.getNearestCorrectOffset( range.end )
|
||||
this.getNearestCorrectOffset( range.from ),
|
||||
this.getNearestCorrectOffset( range.to )
|
||||
);
|
||||
|
||||
if ( !range.isCollapsed() ) {
|
||||
|
|
Loading…
Reference in a new issue