Some more fun frontend stuff I learned:
Firefox will make a div focusable by keyboard if the content overflows:
https://bugzilla.mozilla.org/show_bug.cgi?id=1069739
This is an acessability feature to allow scrolling via keyboard. Make sure you have proper acessible names for these divs.
display: block and display: inline-block
lead to differences in how scrollWidth is calculated when borders/paddings/margins are used.
scrollWidth can "lie" to you about the real width because in some circumstances it does not include the borders/paddings/margins of an block element. Switching that element to inline-block includes these values in the scrollWidth
https://www.w3.org/TR/CSS2/visudet.html#blockwidth and https://stackoverflow.com/questions/10044551/why-does-scrollwidth-only-include-the-left-padding