marijnh/CodeMirror2 — Issue #369: Right clicking in IE 8
Author: pstadermann
Created: 2012-02-16 09:50:05+00:00
State: open

CodeMirror 2 is a real great editor and a big improvement to version 1 - many thanks.

I encountered an issue with right clicking in the textarea on IE 8.

OS: Windows 7 64-bit
Browser: IE 8 32-bit 8.0.7601.17514
CodeMirror: tested with 2.21 and todays snapshot

Steps to reproduce:

- Open demo/fullscreen.html in IE 8
- Press F11 for fullscreen mode
- Insert lots of lines (>200, e.g. 2000 to be sure)
- Right-click in the lower half of the text area

Expected behaviour:

- Cursor is positioned to the clicked position
- Context menu appears

Actual behaviour:

- Context menu appears
- Text may disappear or scroll up

I tried several things but without success:

- modify

with oncontextmenu="return false;"
- changing function onMouseDown(e) to treat a right click the same as a left click (position cursor, prevent default event)

Is there a way to make IE 8 play nice?