From 4639a1c044b6f2f2c18d8205baaf9afb166e6f2b Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Fri, 24 Oct 2014 17:10:53 +0100 Subject: [PATCH] Fix wikitext warning: Get range from selection before trying to find start Bug: 72475 Change-Id: Ib43d9c6b9b46be461354b3b5bbdf9d5de90887a6 --- modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index e31a8091aa..f9ae5e96c4 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -771,7 +771,7 @@ ve.init.mw.ViewPageTarget.static.checkForWikitextWarning = function ( surface, w if ( !selection ) { return; } - node = doc.getBranchNodeFromOffset( selection.start ); + node = doc.getBranchNodeFromOffset( selection.getRange().start ); if ( !( node instanceof ve.ce.ContentBranchNode ) ) { return; }