Disabling middle click scrolling with javascript

前端 未结 4 2009
礼貌的吻别
礼貌的吻别 2020-11-30 11:21

Background: I am creating a table reminiscent of whenisgood.net, in that it has click-n-drag toggling for table elements. I want to call different types of

4条回答
  •  被撕碎了的回忆
    2020-11-30 12:20

    It is a bit old thread already, but I've tried hard to circumvent this in Firefox (I'm still using 3.6) and I'll share my findings, maybe someone will find it helpful.

    Check that if you create an empty HTML file (or a small document with couple of paragraphs) and load it in Firefox, middle click scrollbar does not appear. This is because 's width and height are smaller than window size. If you put a lot of
    's, this is not the case and scrollbar appears on middle click.

    Google managed to prevent middle click scroller to appear in Google Maps in Firefox by making sure (through JS) that size is always less than window size, plus additionally putting .

    This is hardly achievable in general case, but sometimes might be useful.

提交回复
热议问题