PHP / Magento Dev Blog

  • Home

Magento 2 – invisible CSS z-index bug caused 40% conversion drop

by Henryk Tews / Sunday, 02 August 2026 / Published in Magento / Adobe Commerce

The shop was running normally, but conversion suddenly dropped 40% in a single day. Google Analytics showed traffic at normal levels. The problem was invisible to the naked eye – only at a specific screen size did checkout buttons overlap and become unclickable. Diagnosis time: 3 hours, fix time: 30 minutes.

Symptoms

  • 40% conversion drop with no obvious technical cause
  • Shop looks correct on desktop and popular mobile sizes
  • Session recordings (Hotjar) show users clicking on empty areas of the screen
  • Problem started after deploying a theme update

Diagnosis

# Check session recordings in Hotjar / Microsoft Clarity
# Filter: page = /checkout, clicks = rage clicks (multiple clicks in the same spot)

# Check in DevTools at different screen sizes:
# Chrome > DevTools > Toggle Device Toolbar > Custom: 375x667 (iPhone SE)
# Custom: 390x844 (iPhone 14)
# Custom: 412x915 (Pixel 7)

# Check console for JS errors

Cause

The theme update changed the z-index of a loading overlay element. On screens 360-400px wide the overlay was covering the “Proceed to checkout” button making it unclickable. The element was transparent so visually invisible.

Solution

# Find the element blocking the click
# DevTools > Elements > right-click button > Inspect
# Check Styles panel: is anything using position: fixed or z-index above the button
// Debug click targets in browser console
document.addEventListener('click', function(e) {
    var el = document.elementFromPoint(e.clientX, e.clientY);
    console.log('Clicked element:', el, 'z-index:', getComputedStyle(el).zIndex);
}, true);
# Fix z-index in theme CSS
# Before: .loading-overlay { z-index: 9999; }
# After:  .loading-overlay { z-index: 100; pointer-events: none; }

Takeaways

Every frontend deployment requires testing at multiple screen sizes – especially 360px, 375px, 390px, 414px (the most common mobile widths). Session recordings (Hotjar, Clarity – free from Microsoft) should be standard. Conversion monitoring with an alert on drops above 15% catches these problems in hours, not days.

About Henryk Tews

What you can read next

Strategy pattern in PHP – and how Magento 2 uses it in pricing
Xdebug – configuration, PHPStorm, debugging Magento plugins

© 2026 Created by

TOP
Zarządzaj zgodą
Aby zapewnić jak najlepsze wrażenia, korzystamy z technologii, takich jak pliki cookie, do przechowywania i/lub uzyskiwania dostępu do informacji o urządzeniu. Zgoda na te technologie pozwoli nam przetwarzać dane, takie jak zachowanie podczas przeglądania lub unikalne identyfikatory na tej stronie. Brak wyrażenia zgody lub wycofanie zgody może niekorzystnie wpłynąć na niektóre cechy i funkcje.
Funkcjonalne Always active
Przechowywanie lub dostęp do danych technicznych jest ściśle konieczny do uzasadnionego celu umożliwienia korzystania z konkretnej usługi wyraźnie żądanej przez subskrybenta lub użytkownika, lub wyłącznie w celu przeprowadzenia transmisji komunikatu przez sieć łączności elektronicznej.
Preferencje
Przechowywanie lub dostęp techniczny jest niezbędny do uzasadnionego celu przechowywania preferencji, o które nie prosi subskrybent lub użytkownik.
Statystyka
Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do celów statystycznych. Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do anonimowych celów statystycznych. Bez wezwania do sądu, dobrowolnego podporządkowania się dostawcy usług internetowych lub dodatkowych zapisów od strony trzeciej, informacje przechowywane lub pobierane wyłącznie w tym celu zwykle nie mogą być wykorzystywane do identyfikacji użytkownika.
Marketing
Przechowywanie lub dostęp techniczny jest wymagany do tworzenia profili użytkowników w celu wysyłania reklam lub śledzenia użytkownika na stronie internetowej lub na kilku stronach internetowych w podobnych celach marketingowych.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Zobacz preferencje
  • {title}
  • {title}
  • {title}