From fe4098005e1d9e1445eb9eab0318b245e3f299a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 20 Jul 2020 21:29:40 +0200 Subject: [PATCH] Revert "Offset: Send px-ed strings to .css()" The way warning against number values in `.css()` setters was done in jquery/jquery-migrate#337 and later refined in jquery/jquery-migrate#348 there's no need to send px-ed strings for `top` & `left` as they already don't get the "px" suffix. This reverts commit 57038faebc6ece5bd666c28303f8a91ff59153eb. Closes gh-4753 Ref jquery/jquery-migrate/pull/337 Ref jquery/jquery-migrate/pull/348 --- src/offset.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/offset.js b/src/offset.js index 62166bc99..6e9735870 100644 --- a/src/offset.js +++ b/src/offset.js @@ -63,12 +63,6 @@ jQuery.offset = { options.using.call( elem, props ); } else { - if ( typeof props.top === "number" ) { - props.top += "px"; - } - if ( typeof props.left === "number" ) { - props.left += "px"; - } curElem.css( props ); } } -- 2.39.5