Components leaving "stains" when clicked on [img]

Ive got a very strange problems with my components (menubar, menu, and combobox). When I klick on a button/menu-item, it leaves an empty square in mid-space. Its just a square marking where the button or the component (varies) is located.

It only appears when I load the components to an index-file, which contains an enormous amount of code, making it very difficult to locate what exactly is causing this. When I make a blank index-file and load the same components to it, this is no longer a problem.

Since debugging the index-file will be an enormous task, Im wondering if anybody has encountered this problem, and you know what is causing it (and how to fix it).

It wouldnt bother me that much if it didnt force you to press the menubar-buttons twice (once to get rid of that square, and again to press the actual button).

Below is an image of what it looks like when pressing a menubar-button: