Rolling back #7683 as it breaks existing effects in certain scenarios
This commit is contained in:
parent
4c90be6a30
commit
a0532bd933
|
@ -13,8 +13,6 @@
|
|||
|
||||
* Fix issues with Selector an+b logic, :not support, attribute selector double quotes, plus performance improvements. Closes #7873, #7901. [Andrew Dupont]
|
||||
|
||||
* Fix an issue with Element.getDimensions with some element types on non-IE browsers. Closes #7683. [Andrew Dupont]
|
||||
|
||||
* Fix Form.disable to work again on non-form elements. Closes #6887. [Mislav Marohnić]
|
||||
|
||||
* Fix an issue with String.prototype.endsWith. Closes #7822. [altblue]
|
||||
|
|
33
src/dom.js
33
src/dom.js
|
@ -346,28 +346,23 @@ Element.Methods = {
|
|||
element = $(element);
|
||||
var display = $(element).getStyle('display');
|
||||
if (display != 'none' && display != null) // Safari bug
|
||||
return { width: element.offsetWidth, height: element.offsetHeight };
|
||||
|
||||
return {width: element.offsetWidth, height: element.offsetHeight};
|
||||
|
||||
// All *Width and *Height properties give 0 on elements with display none,
|
||||
// so enable the element temporarily
|
||||
var els = element.style, original = {};
|
||||
|
||||
$w('display position visibility height width').each( function(name) {
|
||||
original[name] = els[name];
|
||||
});
|
||||
|
||||
els.visibility = 'hidden';
|
||||
els.display = 'block';
|
||||
|
||||
Position.absolutize(element);
|
||||
var originalWidth = element.clientWidth;
|
||||
var els = element.style;
|
||||
var originalVisibility = els.visibility;
|
||||
var originalPosition = els.position;
|
||||
var originalDisplay = els.display;
|
||||
els.visibility = 'hidden';
|
||||
els.position = 'absolute';
|
||||
els.display = 'block';
|
||||
var originalWidth = element.clientWidth;
|
||||
var originalHeight = element.clientHeight;
|
||||
Position.relativize(element);
|
||||
|
||||
$w('display position visibility height width').each( function(name) {
|
||||
els[name] = original[name] || '';
|
||||
});
|
||||
return { width: originalWidth, height: originalHeight };
|
||||
els.display = originalDisplay;
|
||||
els.position = originalPosition;
|
||||
els.visibility = originalVisibility;
|
||||
return {width: originalWidth, height: originalHeight};
|
||||
},
|
||||
|
||||
makePositioned: function(element) {
|
||||
|
|
Loading…
Reference in New Issue