// Any event listeners we may need to cancel later
listenevents : [],
+ // The initial overflow setting
+ initialoverflow : '',
+
setup_chooser_dialogue : function(bodycontent, headercontent, config) {
// Set Default options
var params = {
var bb = this.overlay.get('boundingBox');
var dialogue = this.container.one('.alloptions');
+ // Get the overflow setting when the chooser was opened - we
+ // may need this later
+ if (Y.UA.ie > 0) {
+ this.initialoverflow = Y.one('html').getStyle('overflow');
+ } else {
+ this.initialoverflow = Y.one('body').getStyle('overflow');
+ }
+
var thisevent;
// This will detect a change in orientation and retrigger centering
// Set a fixed position if the window is large enough
if (newheight > this.get('minheight')) {
bb.setStyle('position', 'fixed');
+ // Disable the page scrollbars
+ if (Y.UA.ie > 0) {
+ Y.one('html').setStyle('overflow', 'hidden');
+ } else {
+ Y.one('body').setStyle('overflow', 'hidden');
+ }
} else {
bb.setStyle('position', 'absolute');
offsettop = Y.one('window').get('scrollTop');
+ // Ensure that the page scrollbars are enabled
+ if (Y.UA.ie > 0) {
+ Y.one('html').setStyle('overflow', this.initialoverflow);
+ } else {
+ Y.one('body').setStyle('overflow', this.initialoverflow);
+ }
}
// Take off 15px top and bottom for borders, plus 40px each for the title and button area before setting the
hide : function() {
// Detach the global keypress handler before hiding
Y.one('document').detach('keyup', this.handle_key_press, this);
+
+ // Re-enable the page scrollbars
+ if (Y.UA.ie > 0) {
+ Y.one('html').setStyle('overflow', this.initialoverflow);
+ } else {
+ Y.one('body').setStyle('overflow', this.initialoverflow);
+ }
+
this.container.detachAll();
this.overlay.hide();
},