Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1. Closes #7063. References #3044, #3813, #6706. [Thomas Fuchs, davidjrice]
This commit is contained in:
parent
9ff57b042d
commit
1b8ef5af86
|
@ -1,10 +1,12 @@
|
|||
*SVN*
|
||||
|
||||
* Prevent a crash in Safari when calling String#evalJSON(true) on very large strings. Add String#isJSON. Closes #7834. [Tobie Langel]
|
||||
* Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1. Closes #7063. References #3044, #3813, #6706. [Thomas Fuchs, davidjrice]
|
||||
|
||||
* Prevent a crash in Safari 1.3 on String#stripScripts and String#extractScripts. Closes #8332. [grant, Tobie Langel]
|
||||
* Prevent a crash in Safari when calling String#evalJSON(true) on very large strings. Add String#isJSON. Closes #7834. [Tobie Langel]
|
||||
|
||||
* Allow JSON data to contain line breaks. Closes #8271. [pijyster, Tobie Langel]
|
||||
* Prevent a crash in Safari 1.3 on String#stripScripts and String#extractScripts. Closes #8332. [grant, Tobie Langel]
|
||||
|
||||
* Allow JSON data to contain line breaks. Closes #8271. [pijyster, Tobie Langel]
|
||||
|
||||
* Add Hash.prototype.index which returns the first found property that has a specific value. Closes #8528. [Thomas Fuchs, slusarz, Mislav Marohnić]
|
||||
Examples:
|
||||
|
|
17
src/dom.js
17
src/dom.js
|
@ -797,6 +797,23 @@ else if (Prototype.Browser.Gecko) {
|
|||
}
|
||||
|
||||
else if (Prototype.Browser.WebKit) {
|
||||
Element.Methods.setOpacity = function(element, value) {
|
||||
element = $(element);
|
||||
element.style.opacity = (value == 1 || value === '') ? '' :
|
||||
(value < 0.00001) ? 0 : value;
|
||||
|
||||
if (value == 1)
|
||||
if(element.tagName == 'IMG' && element.width) {
|
||||
element.width++; element.width--;
|
||||
} else try {
|
||||
var n = document.createTextNode(' ');
|
||||
element.appendChild(n);
|
||||
element.removeChild(n);
|
||||
} catch (e) {}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
// Safari returns margins on body which is incorrect if the child is absolutely
|
||||
// positioned. For performance reasons, redefine Position.cumulativeOffset for
|
||||
// KHTML/WebKit only.
|
||||
|
|
Loading…
Reference in New Issue