Enter in IE9 sometimes doesn't work #1138

Closed
shurama opened this Issue Jan 6, 2013 · 6 comments

Projects

None yet

2 participants

@shurama
shurama commented Jan 6, 2013

Just found this problem for IE9.

  1. Copy/paste some javascript code to editor area.
  2. Put the cursor to the end of some line of code (or press End) and press Enter.
    No new line is added.
    If you do this several times and then scroll down the text you will see that the cursor misses line position.

If type a text manually - everything works ok, the problem appears only after copy/paste.

In Chrome - everything works ok.
IE7 Compatible mode for IE9 is also Ok.

    self.mirror = CodeMirror.fromTextArea(el, {
        mode: "javascript",
        lineNumbers: false,
        gutters: ["CodeMirror-linenumbers", "breakpoints"],
        lineWrapping: true,
        enterMode: 'keep',
        //fixedGutter: true,
        matchBrackets: true,
        theme: "neat",
        extraKeys: { "Ctrl-Space": "autocomplete" }
    });
    self.mirror.on("gutterClick", function (cm, n) {
        var info = cm.lineInfo(n);
        cm.setGutterMarker(n, "breakpoints", info.gutterMarkers ? null : makeMarker());
    });
@marijnh
Member
marijnh commented Jan 7, 2013

I could not reproduce this. Does the problem go away if you disable matchBrackets? Which text, precisely, did you paste in? And does the problem happen on all lines, or only on specific ones?

@shurama
shurama commented Jan 9, 2013

Disabling matchBrackets didn’t work. I disabled all the options, but the same result:

   self.mirror = CodeMirror.fromTextArea($pm.gc("Text2Edit").Element().get(0), {

        mode: "javascript" //,

        //lineNumbers: false,

        //gutters: ["CodeMirror-linenumbers", "breakpoints"],

        //lineWrapping: true,

        //enterMode: 'keep',

        //fixedGutter: true,

        //matchBrackets: true,

        //theme: "neat",

        //extraKeys: { "Ctrl-Space": "autocomplete" }

    });

Enter works fine except when the cursor is at the end of a line.

I tried any text, for example this one:

var editor = CodeMirror.fromTextArea(document.getElementById("code"), {

lineNumbers: true,

gutters: ["CodeMirror-linenumbers", "breakpoints"]

});

editor.on("gutterClick", function(cm, n) {

var info = cm.lineInfo(n);

cm.setGutterMarker(n, "breakpoints", info.markers ? null : makeMarker());

});

function makeMarker() {

var marker = document.createElement("div");

marker.innerHTML = "?";

marker.className = "breakpoint";

return marker;

}

Best Regards,

Alex Malin

From: Marijn Haverbeke [mailto:notifications@github.com]
Sent: Monday, January 07, 2013 1:17 PM
To: marijnh/CodeMirror
Cc: shurama
Subject: Re: [CodeMirror] Enter in IE9 sometimes doesn't work (#1138)

I could not reproduce this. Does the problem go away if you disable matchBrackets? Which text, precisely, did you paste in? And does the problem happen on all lines, or only on specific ones?


Reply to this email directly or view it on GitHub #1138 (comment) .

Описание: Рисунок удален отправителем.

@marijnh
Member
marijnh commented Jan 10, 2013

Thanks for the added information. Still no luck reproducing it. Does it also happen for you on http://codemirror.net/mode/javascript ? Which CodeMirror version are you using? And which precise IE9 version?

@shurama
shurama commented Jan 10, 2013

IE version number is:

On http://codemirror.net/mode/javascript http://codemirror.net/mode/javascript everything works fine...

I open codemirror editor inside jquery modal dialog. Maybe this will help…

Best Regards,

Alex Malin

From: Marijn Haverbeke [mailto:notifications@github.com]
Sent: Thursday, January 10, 2013 11:56 AM
To: marijnh/CodeMirror
Cc: shurama
Subject: Re: [CodeMirror] Enter in IE9 sometimes doesn't work (#1138)

Thanks for the added information. Still no luck reproducing it. Does it also happen for you on http://codemirror.net/mode/javascript ? Which CodeMirror version are you using? And which precise IE9 version?


Reply to this email directly or view it on GitHub #1138 (comment) .

https://github.com/notifications/beacon/vYA5e6s-wkdQnqKisbASb95LQ28PocI7pNgZaWJBwuq5fLs8PnHkfZ-QD3iSer8g.gif

@marijnh
Member
marijnh commented Jan 10, 2013

Did you try with the latest CodeMirror development snapshot? If that doesn't help, could you give me a minimal (i.e. all cruft that doesn't help trigger the bug) HTML page that reproduces the problem?

@marijnh
Member
marijnh commented Feb 6, 2013

Timing out. Respond with more information and a test case if this still comes up.

@marijnh marijnh closed this Feb 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment