Magento – Remove sticky behaviour of cart summary in Magento 2.2

cartcheckoutmagento2.2magento2.2.6

i need to disable sticky behaviour from the cart summary block in checkout cart page, but can't figure out how to do it.

I tried overriding js file

/vendor/magento/theme-frontend-blank/Magento_Theme/web/js/theme.js

into

app/design/frontend/MyVendor/MyTheme/Magento_Theme/web/js/theme.js

and commenting out sticky call:

 /* $('.cart-summary').mage('sticky', {
    container: '#maincontent'
  }); */

as is suggested in Customize sticky behaviour of Cart Summary: Magento 2, without success.

I'm using Magento 2.2.6

Thanks in advance,

Antonio.

Best Answer

Fastest and rude solution:

On your custom theme CSS file add this:

.cart-summary {
   position: unset !important;
}

I found this solution as I'm not using theme.js to custom my theme and worked fine for me on Magento 2.3...

Maybe not the best practice but works fine for most situations.