Clicking on preview image reloads page

Every time I click on an image in the Code Editor’s preview the whole page reloads, making opening them impossible.

(from redmine: issue id 2437, created on 2016-09-07 by root)