From 865469f5e60f55feb28469bb0a7526dd22f04b4e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Tue, 21 Jan 2020 14:11:06 +0100 Subject: [PATCH] CSS: Remove the opacity CSS hook The consequence is `.css( "opacity" )` will now return an empty string for detached elements in standard-compliant browsers and "1" in IE & the legacy Edge. That behavior is shared by most other CSS properties which we're not normalizing either. Closes gh-4593 --- src/css.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/css.js b/src/css.js index 6d67ffaa7..2bffa9610 100644 --- a/src/css.js +++ b/src/css.js @@ -185,18 +185,7 @@ jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, + cssHooks: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { -- 2.39.5