~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/console/console.js

  • Committer: wagrant
  • Date: 2008-12-23 00:18:43 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1062
Console input from the text box now has a linefeed appended by the browser. We
previously didn't send a linefeed to the server, giving some really strange
bugs.

Fixes [ 1901147 ] Console: infinite loop issue
  and [ 2086967 ] Empty line input interpreted as EOF in IVLE console

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
    else
262
262
    {
263
263
        GLOBAL_inputbox = inputbox;     /* For timer */
264
 
        var inputline = inputbox.value;
 
264
        var inputline = inputbox.value + "\n";
265
265
        var graytimer = setTimeout("GLOBAL_inputbox.setAttribute(\"class\", "
266
266
            + "\"disabled\");", 100);
267
267
    }
275
275
        // Print input line itself in a span
276
276
        var span = document.createElement("span");
277
277
        span.setAttribute("class", "inputMsg");
278
 
        span.appendChild(document.createTextNode(inputline + "\n"));
 
278
        span.appendChild(document.createTextNode(inputline));
279
279
        output.appendChild(span);
280
280
    }
281
281
    var args = {"key": server_key, "text":inputline};