Closed (fixed)
Project:
Modal Frame API
Version:
6.x-1.6
Component:
Javascript
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2010 at 11:09 UTC
Updated:
29 Aug 2010 at 16:57 UTC
In function Drupal.modalFrame.computeCenterPosition Opera do not understand $window.height(); but correct work with $window.innerHeight; Result code is:
Drupal.modalFrame.computeCenterPosition = function($element, elementSize) {
var $window = $(window);
var $height = $window.height();
if ($.browser.opera){
$height = $window.innerHeight;
}
var position = {
left: Math.max(0, parseInt(($window.width() - elementSize.width) / 2)),
top: Math.max(0, parseInt(($height - elementSize.height) / 2))
};
if ($element.css('position') != 'fixed') {
var $document = $(document);
position.left += $document.scrollLeft();
position.top += $document.scrollTop();
}
return position;
};
Comments
Comment #1
markus_petrux commentedhmm... height() is a jQuery method.
Do you have a reference to a jQuery bug report or similar?
Which versions of jQuery are affected?
Comment #2
markus_petrux commentedI have been testing with Opera 10.10 (up to date, I think), and it seems to work correctly. So your issue could be related to something else.
I'm using jQuery 1.3.x with jQuery UI 1.7.x. Maybe that makes a difference?
Comment #3
Xaber commentedI'm using custom jQuery library (in clean drupal installation). It is 1.2.6 ...
Comment #4
markus_petrux commented"custom jQuery library" ? hmm...
Maybe this is not including components that are required or something of that sort.
AFAICT, all jQuery UI components should be available via jQuery UI module. It is the module that uses jQuery UI stuff that instructs jQuery UI module to load the components that are required.
Anyway, that could not be the issue, but something related to the jQuery version. Drupal 6 ships with jQuery 1.2.6, but there is jQuery 1.3.x that maybe have bugs fixed that are not in 1.2.x.
The problem with jQuery 1.3.x is that you'll have to install jQuery Update module, the 6.x-2.x-dev package, and then you need to install jQuery UI 1.7.x as the library used by jQuery UI module.
I'm changing the issue category to support request because this seems more a compatibily issue.
Comment #5
markus_petrux commentedI'm assuming this is a problem of mismatch between jQuery and jQuery UI libraries. Please, re-open if the problem persists and you can provide more information on how to reproduce this issue.
Comment #7
pheraph commentedHad similar problems with jQuery 1.2.6 and Opera, updating to jQuery 1.3.x indeed fixed it.