mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 19:26:46 +00:00
Merge "Fix for incorrect usage of ve.Range"
This commit is contained in:
commit
49fea58c76
|
@ -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