diff --git a/src/modules/inactive/rangy-position.js b/src/modules/inactive/rangy-position.js index fc71afb1..1e4c73bf 100644 --- a/src/modules/inactive/rangy-position.js +++ b/src/modules/inactive/rangy-position.js @@ -272,6 +272,14 @@ rangy.createModule("Position", ["WrappedSelection"], function(api, module) { }; }; }; + + var createDocumentBoundaryPosGetter = function (isStart) { + return function() { + var pos = this["get" + (isStart ? "Start" : "End") + "ClientPos"](); + var scrollPos = getScrollPosition( dom.getWindow(this.startContainer) ); + return { x: pos.x + scrollPos.x, y: pos.y + scrollPos.y }; + }; + }; var rangeProto = api.rangePrototype; @@ -457,14 +465,6 @@ rangy.createModule("Position", ["WrappedSelection"], function(api, module) { return getRectFromBoundaries(createWrappedRange(range)); }; } - - function createDocumentBoundaryPosGetter(isStart) { - return function() { - var pos = this["get" + (isStart ? "Start" : "End") + "ClientPos"](); - var scrollPos = getScrollPosition( dom.getWindow(this.startContainer) ); - return { x: pos.x + scrollPos.x, y: pos.y + scrollPos.y }; - }; - } } util.extend(rangeProto, {