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:
Inez Korczyński 2013-03-07 15:46:25 -08:00
parent e9b8021bf3
commit c021445649

View file

@ -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() ) {