diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js
index ae921adf55..8a8741b907 100644
--- a/apps/common/main/lib/component/ComboBox.js
+++ b/apps/common/main/lib/component/ComboBox.js
@@ -357,7 +357,7 @@ define([
$selected = $list.find('> li.selected');
if ($selected.length) {
- var itemTop = $selected.position().top,
+ var itemTop = Common.Utils.getPosition($selected).top,
itemHeight = $selected.outerHeight(),
listHeight = $list.outerHeight();
@@ -514,7 +514,7 @@ define([
if (this.scroller) {
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
var $list = $(this.el).find('ul');
- var itemTop = item.position().top,
+ var itemTop = Common.Utils.getPosition(item).top,
itemHeight = item.outerHeight(),
listHeight = $list.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js
index a17c4bb951..7ce9f0b5be 100644
--- a/apps/common/main/lib/component/ComboBoxFonts.js
+++ b/apps/common/main/lib/component/ComboBoxFonts.js
@@ -745,7 +745,7 @@ define([
itemNode.addClass('selected');
itemNode.find('a').attr('aria-checked', true);
- var itemTop = itemNode.position().top,
+ var itemTop = Common.Utils.getPosition(itemNode).top,
menuTop = menuEl.scrollTop();
if (itemTop != 0)
diff --git a/apps/common/main/lib/component/Layout.js b/apps/common/main/lib/component/Layout.js
index bb266c2b13..2ed7aa1814 100644
--- a/apps/common/main/lib/component/Layout.js
+++ b/apps/common/main/lib/component/Layout.js
@@ -369,7 +369,7 @@ define([
}
if (this.resize.type == 'vertical')
- value -= panel.position().top;
+ value -= Common.Utils.getPosition(panel).top;
// if (this.resize.type == 'horizontal')
// value -= panel.position().left;
@@ -427,7 +427,7 @@ define([
}
// if (resize.type == 'vertical')
- value -= panel.position().top;
+ value -= Common.Utils.getPosition(panel).top;
// if (resize.type == 'horizontal')
// value -= panel.position().left;
diff --git a/apps/common/main/lib/component/ListView.js b/apps/common/main/lib/component/ListView.js
index 71239347a9..2d6840e4c4 100644
--- a/apps/common/main/lib/component/ListView.js
+++ b/apps/common/main/lib/component/ListView.js
@@ -296,7 +296,7 @@ define([
div = (idx>=0 && this.dataViewItems.length>idx) ? $(this.dataViewItems[idx].el) : innerEl.find('#' + record.get('id'));
if (div.length<=0) return;
- var div_top = div.position().top,
+ var div_top = Common.Utils.getPosition(div).top,
div_height = div.outerHeight(),
div_first = this.dataViewItems[0].el,
div_first_top = div_first ? div_first.offsetTop : 0,
diff --git a/apps/common/main/lib/component/Menu.js b/apps/common/main/lib/component/Menu.js
index d6bce427fe..7429c2446a 100644
--- a/apps/common/main/lib/component/Menu.js
+++ b/apps/common/main/lib/component/Menu.js
@@ -410,7 +410,7 @@ define([
var $selected = menuRoot.find('> li .checked');
if ($selected.length) {
- var itemTop = $selected.position().top,
+ var itemTop = Common.Utils.getPosition($selected).top,
itemHeight = $selected.outerHeight(),
listHeight = menuRoot.outerHeight();
if (!!this.options.scrollToCheckedItem && (itemTop < 0 || itemTop + itemHeight > listHeight)) {
@@ -516,7 +516,7 @@ define([
var item = itemCandidate.cmpEl.find('a');
if (this.scroller) {
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible, wheelSpeed: this.wheelSpeed});
- var itemTop = item.position().top,
+ var itemTop = Common.Utils.getPosition(item).top,
itemHeight = item.outerHeight(),
listHeight = this.menuRoot.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
@@ -1034,7 +1034,7 @@ define([
var menuRoot = this.menuRoot,
$selected = menuRoot.find('> li .checked');
if ($selected.length) {
- var itemTop = $selected.position().top,
+ var itemTop = Common.Utils.getPosition($selected).top,
itemHeight = $selected.outerHeight(),
listHeight = menuRoot.outerHeight();
if (!!this.options.scrollToCheckedItem && (itemTop < 0 || itemTop + itemHeight > listHeight)) {
@@ -1127,7 +1127,7 @@ define([
var item = itemCandidate.el;
if (this.scroller) {
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
- var itemTop = item.position().top,
+ var itemTop = Common.Utils.getPosition(item).top,
itemHeight = item.outerHeight(),
listHeight = this.menuRoot.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js
index af4561ae3f..831f46b6bd 100644
--- a/apps/common/main/lib/component/Mixtbar.js
+++ b/apps/common/main/lib/component/Mixtbar.js
@@ -588,7 +588,7 @@ define([
setMoreButton: function(tab, panel) {
var me = this;
if (!btnsMore[tab]) {
- var top = panel.position().top;
+ var top = Common.Utils.getPosition(panel).top;
var box = $('
' +
'
' +
'
' +
diff --git a/apps/common/main/lib/component/TabBar.js b/apps/common/main/lib/component/TabBar.js
index 9276c31bea..c9c92dbdba 100644
--- a/apps/common/main/lib/component/TabBar.js
+++ b/apps/common/main/lib/component/TabBar.js
@@ -519,7 +519,7 @@ define([
if (this.$bar.find('.separator-item').length === 0) {
this.$bar.append('
');
}
- this.$bar.scrollLeft(this.$bar.scrollLeft() + (tab.position().left + parseInt(tab.css('width')) - this.$bar.width()) + (this.$bar.width() > 400 ? 20 : 5));
+ this.$bar.scrollLeft(this.$bar.scrollLeft() + (Common.Utils.getPosition(tab).left + parseInt(tab.css('width')) - this.$bar.width()) + (this.$bar.width() > 400 ? 20 : 5));
this.checkInvisible(suppress);
} else {
if (!this.isTabVisible(this.tabs.length - 1) && this.$bar.find('.separator-item').length === 0) {
@@ -530,7 +530,7 @@ define([
if (index == 'forward') {
for (var i = 0; i < this.tabs.length; i++) {
tab = this.tabs[i].$el;
- right = tab.position().left + parseInt(tab.css('width'));
+ right = Common.Utils.getPosition(tab).left + parseInt(tab.css('width'));
if (right > rightbound) {
this.$bar.scrollLeft(this.$bar.scrollLeft() + (right - rightbound) + (this.$bar.width() > 400 ? 20 : 5));
@@ -541,7 +541,7 @@ define([
} else if (index == 'backward') {
for (i = this.tabs.length; i-- > 0; ) {
tab = this.tabs[i].$el;
- left = tab.position().left;
+ left = Common.Utils.getPosition(tab).left;
if (left < 0) {
this.$bar.scrollLeft(this.$bar.scrollLeft() + left - 26);
@@ -551,7 +551,7 @@ define([
}
} else if (typeof index == 'number') {
tab = this.tabs[index].$el;
- left = tab.position().left;
+ left = Common.Utils.getPosition(tab).left;
right = left + parseInt(tab.css('width'));
if (left < 0) {
diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js
index 983143607b..d00a57c200 100644
--- a/apps/common/main/lib/component/Window.js
+++ b/apps/common/main/lib/component/Window.js
@@ -515,7 +515,7 @@ define([
if (!options.dontshow) body.css('padding-bottom', '10px');
if (options.maxwidth && options.width=='auto') {
- var width = !Common.UI.isRTL() ? (text.position().left + text.width() + parseInt(text_cnt.css('padding-right'))) :
+ var width = !Common.UI.isRTL() ? (Common.Utils.getPosition(text).left + text.width() + parseInt(text_cnt.css('padding-right'))) :
(parseInt(text_cnt.css('padding-right')) + icon_width + text.width() + parseInt(text_cnt.css('padding-left')));
if (width > options.maxwidth)
options.width = options.maxwidth;
@@ -525,7 +525,7 @@ define([
body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));
var span_el = check.find('span');
var width = !Common.UI.isRTL() ?
- (Math.max(text.width(), span_el.length>0 ? span_el.position().left + span_el.width() : 0) + text.position().left + parseInt(text_cnt.css('padding-right'))) :
+ (Math.max(text.width(), span_el.length>0 ? Common.Utils.getPosition(span_el).left + span_el.width() : 0) + Common.Utils.getPosition(text).left + parseInt(text_cnt.css('padding-right'))) :
(parseInt(text_cnt.css('padding-right')) + icon_width + parseInt(text_cnt.css('padding-left')) +
(Math.max(text.width(), check.length>0 ? $(check).find('.checkbox-indeterminate').outerWidth(true) : 0)));
window.setSize(width, parseInt(body.css('height')) + parseInt(header.css('height')));
diff --git a/apps/common/main/lib/extend/Bootstrap.js b/apps/common/main/lib/extend/Bootstrap.js
index 629b44b8d0..6e86f36c6a 100755
--- a/apps/common/main/lib/extend/Bootstrap.js
+++ b/apps/common/main/lib/extend/Bootstrap.js
@@ -72,7 +72,7 @@ function onDropDownKeyDown(e) {
function checkFocusedItem(cmp, item) {
var innerHeight = cmp.innerHeight(),
padding = (innerHeight - cmp.height())/2,
- pos = item.position().top,
+ pos = Common.Utils.getPosition(item).top,
itemHeight = item.outerHeight();
if (pos<0)
cmp.scrollTop(cmp.scrollTop() + pos - padding);
diff --git a/apps/documenteditor/main/app/controller/Search.js b/apps/documenteditor/main/app/controller/Search.js
index a136385dee..f86aba2d5e 100644
--- a/apps/documenteditor/main/app/controller/Search.js
+++ b/apps/documenteditor/main/app/controller/Search.js
@@ -315,7 +315,7 @@ define([
if (index !== -1) {
var item = this.resultItems[index].$el,
itemHeight = item.outerHeight(),
- itemTop = item.position().top,
+ itemTop = Common.Utils.getPosition(item).top,
container = this.view.$resultsContainer,
containerHeight = container.outerHeight(),
containerTop = container.scrollTop();
diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js
index a17b0aba14..b06c257c76 100644
--- a/apps/documenteditor/main/app/view/FileMenu.js
+++ b/apps/documenteditor/main/app/view/FileMenu.js
@@ -608,7 +608,7 @@ define([
panel.show(opts);
if (this.scroller) {
- var itemTop = item.$el.position().top,
+ var itemTop = Common.Utils.getPosition(item.$el).top,
itemHeight = item.$el.outerHeight(),
listHeight = this.$el.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
diff --git a/apps/pdfeditor/main/app/controller/Search.js b/apps/pdfeditor/main/app/controller/Search.js
index 6ea7cbccb1..dc6b2b7cf7 100644
--- a/apps/pdfeditor/main/app/controller/Search.js
+++ b/apps/pdfeditor/main/app/controller/Search.js
@@ -315,7 +315,7 @@ define([
if (index !== -1) {
var item = this.resultItems[index].$el,
itemHeight = item.outerHeight(),
- itemTop = item.position().top,
+ itemTop = Common.Utils.getPosition(item).top,
container = this.view.$resultsContainer,
containerHeight = container.outerHeight(),
containerTop = container.scrollTop();
diff --git a/apps/pdfeditor/main/app/view/FileMenu.js b/apps/pdfeditor/main/app/view/FileMenu.js
index 8c07a888de..146df6b32b 100644
--- a/apps/pdfeditor/main/app/view/FileMenu.js
+++ b/apps/pdfeditor/main/app/view/FileMenu.js
@@ -585,7 +585,7 @@ define([
panel.show(opts);
if (this.scroller) {
- var itemTop = item.$el.position().top,
+ var itemTop = Common.Utils.getPosition(item.$el).top,
itemHeight = item.$el.outerHeight(),
listHeight = this.$el.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
diff --git a/apps/presentationeditor/main/app/controller/Search.js b/apps/presentationeditor/main/app/controller/Search.js
index 16d7a702fa..9c31cff4d4 100644
--- a/apps/presentationeditor/main/app/controller/Search.js
+++ b/apps/presentationeditor/main/app/controller/Search.js
@@ -281,7 +281,7 @@ define([
if (index !== -1) {
var item = this.resultItems[index].$el,
itemHeight = item.outerHeight(),
- itemTop = item.position().top,
+ itemTop = Common.Utils.getPosition(item).top,
container = this.view.$resultsContainer,
containerHeight = container.outerHeight(),
containerTop = container.scrollTop();
diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js
index 3dcb5e3e2b..143ffad529 100644
--- a/apps/presentationeditor/main/app/view/FileMenu.js
+++ b/apps/presentationeditor/main/app/view/FileMenu.js
@@ -600,7 +600,7 @@ define([
panel.show(opts);
if (this.scroller) {
- var itemTop = item.$el.position().top,
+ var itemTop = Common.Utils.getPosition(item.$el).top,
itemHeight = item.$el.outerHeight(),
listHeight = this.$el.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
diff --git a/apps/spreadsheeteditor/main/app/controller/Search.js b/apps/spreadsheeteditor/main/app/controller/Search.js
index d98191d044..8fa5a6e293 100644
--- a/apps/spreadsheeteditor/main/app/controller/Search.js
+++ b/apps/spreadsheeteditor/main/app/controller/Search.js
@@ -419,7 +419,7 @@ define([
if (index !== -1) {
var item = this.resultItems[index].$el,
itemHeight = item.outerHeight(),
- itemTop = item.position().top,
+ itemTop = Common.Utils.getPosition(item).top,
container = this.view.$resultsContainer.find('.search-items'),
containerHeight = container.outerHeight(),
containerTop = container.scrollTop();
diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js
index c093282b06..e6c05d5dcc 100644
--- a/apps/spreadsheeteditor/main/app/view/FileMenu.js
+++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js
@@ -586,7 +586,7 @@ define([
panel.show(opts);
if (this.scroller) {
- var itemTop = item.$el.position().top,
+ var itemTop = Common.Utils.getPosition(item.$el).top,
itemHeight = item.$el.outerHeight(),
listHeight = this.$el.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
diff --git a/apps/spreadsheeteditor/main/app/view/PivotSettings.js b/apps/spreadsheeteditor/main/app/view/PivotSettings.js
index 6d383fae26..f1966c9e2c 100644
--- a/apps/spreadsheeteditor/main/app/view/PivotSettings.js
+++ b/apps/spreadsheeteditor/main/app/view/PivotSettings.js
@@ -244,7 +244,7 @@ define([
// scroll
var heightListView = item.$el.parent().height(),
- positionTopItem = item.$el.position().top,
+ positionTopItem = Common.Utils.getPosition(item.$el).top,
heightItem = item.$el.outerHeight(),
scrollTop = item.$el.parent().scrollTop();
if (positionTopItem < heightItem && scrollTop > 0) {