I also have this problem, and I think I see what is happening.
A column block with massive (5678 pixels) margin and indentation makes this block very tall. On browsers other than Firefox, positive and negative values cancel each other out, but FF does make it so high.
FF also knows that the two cancel each other out, but they seem to look at the 5678px add-on and decide that the column block is digging the bottom of the #wrapper block. This is an overflow - and with the overflow set to auto on #wrapper, you see the true size of the #wrapper with the scroll bar to the side.
With overflow set to hidden, FF selects the scroll bar, but still seems to scroll the #wrapper content so that the element the fragment points to is at the top of the page. This is normal behavior for fragmented links in scrollable blocks, but since there is no scrollbar, you cannot scroll the contents again, hence it looks like the fragment was executed by the fragment.
In short, I suspect that in this example, FF works with an invisible scrollbar. This may be considered a mistake, but it is probably the correct behavior. The ability to scroll content up and down inside a fixed-size block without overflow using URL fragments is a method that can be effectively used to implement image sliders that work even in the absence of JavaScript.
Hope this helps. This puzzled me for years, and this explanation suddenly hit me because of the blue. My current workaround for this is to use the jQuery “scroll to” plugin to scroll the entire page to a fragment, as this seems to prevent #wrapper content from scrolling inside.
You can also remove the "display: hidden" C # wrapper, but your page then ends half a mile away.
Jason source share