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

« back to all changes in this revision

Viewing changes to ivle/webapp/console/media/console.js

  • Committer: William Grant
  • Date: 2010-02-26 01:09:49 UTC
  • Revision ID: grantw@unimelb.edu.au-20100226010949-xka8c9s6y7aq4id1
Scroll to the end of the console output after *every* output, not just some. This removes some artifiacts resulting from scrolling a fraction of a second too late.

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
        span.setAttribute("class", "inputMsg");
325
325
        span.appendChild(document.createTextNode(inputline));
326
326
        output.appendChild(span);
 
327
        divScroll.activeScroll();
327
328
    }
328
329
    var args = {
329
330
        "ivle.op": "chat", "kind": which, "key": server_key,
355
356
        {
356
357
            output.appendChild(document.createTextNode(res.okay + "\n"));
357
358
            output.appendChild(span);
 
359
            divScroll.activeScroll();
358
360
        }
359
361
        // set the prompt to >>>
360
362
        set_prompt(">>>");
393
395
        if (res.output.length > 0)
394
396
        {
395
397
            output.appendChild(document.createTextNode(res.output));
 
398
            divScroll.activeScroll();
396
399
        }
397
400
        var callback = function(xhr)
398
401
            {
415
418
        // Open up the console so we can see the output
416
419
        console_maximize();
417
420
 
418
 
        /* Auto-scrolling */
419
 
        divScroll.activeScroll();
420
 
 
421
421
        // Return early, so we don't re-enable the input box.
422
422
        return;
423
423
    }