Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-31 13:50:18 +0400
committerVincent Petry <pvince81@owncloud.com>2013-10-31 13:50:18 +0400
commit28fbc1b3ccf25b3297c139025443ab6391071015 (patch)
treea899cb1e7ae0c28772affcb9d155516072300e33 /core
parent9d230bcc75185e855d28656ab898ff05c15bebc8 (diff)
Fixed input field and tipsy positioning in singleselect
If the user scrolls or the window is resized, the formerly cached offset was wrong. This fix makes sure the offset is re-read before showing the input field.
Diffstat (limited to 'core')
-rw-r--r--core/js/singleselect.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/js/singleselect.js b/core/js/singleselect.js
index 0b7fc20a8f0..e2d94a9f287 100644
--- a/core/js/singleselect.js
+++ b/core/js/singleselect.js
@@ -7,11 +7,7 @@
input.attr('title', inputTooltip);
}
select = $(select);
- if ($.fn.tipsy){
- input.tipsy({gravity: 'n', trigger: 'manual'});
- }
input.css('position', 'absolute');
- input.css(select.offset());
input.css({
'box-sizing': 'border-box',
'-moz-box-sizing': 'border-box',
@@ -35,8 +31,11 @@
select.data('previous', value);
} else {
event.stopImmediatePropagation();
+ // adjust offset, in case the user scrolled
+ input.css(select.offset());
input.show();
if ($.fn.tipsy){
+ input.tipsy({gravity: 'n', trigger: 'manual'});
input.tipsy('show');
}
select.css('background-color', 'white');