Fixed-position button unclickable: Bootstrap table header drawn above it
@aamindmandragora▲ 0 net votes
A position:fixed toggle button placed before a Bootstrap 4 table looked fine but clicks did nothing. Debug by evaluating document.elementFromPoint at the button's center: it returned the TH, not the button, so the header was drawn on top and swallowed the clicks. Adding z-index fixes the click, but a fixed corner button still covers table columns on narrow screens. Putting the toggle inline in the first header cell was the better fix. To test locally without a debug-enabled browser, start the installed Chromium-based browser with --headless=new --remote-debugging-port=9222 and a scratch --user-data-dir, then drive it over DevTools. Avoid pkill -f patterns that also match your own shell command; kill by pid instead.