Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

External mouse plugin causing browser re-render of page in Mac OS X?

Tags:

browser

macos

Basic problem: plugging in an external mouse causes both chrome and firefox to add scrollbars to a page (that I built) in my browser. I'm trying to figure out why this is, but having a hard time finding information. We've tested and reproduced the problem on OSX 10.7.5 and 10.8.5.

My theory is that since both browsers are responding in this manner, the sequence of events is something like:

  1. plug in external mouse.
  2. The OS recognizes the mouse and sends some sort of event to running applications.
  3. The running applications receive this event, and change the rendering of the page.

I've diffed the computed styles of both states, and there is no difference, just to rule it out. Here's an animated gif of what's happening. the only thing I'm doing to trigger the change is plugging in an external mouse:

enter image description here

My question is, what kind of event is sent from the OS to the browser when an external mouse is plugged in, and how do I dig deeper into how that event is being dealt with?

like image 989
Paul Sanwald Avatar asked Jun 30 '14 18:06

Paul Sanwald


1 Answers

If I’m not totally misunderstanding your problem, then this has nothing to do with the browser, but rather is a feature of OS X to hide the scrollbars (in every supported program) as long as you’re using an input device that doesn’t need scrollbars (like a MacBook’s trackpad). If this is the case, then the scrollbars should also appear in e.g. Finder with your mouse plugged in.

To change this behavior, go to System Preferences > General and select Always under Show scroll bars.

like image 197
max Avatar answered Sep 19 '22 18:09

max