chromium / axiom

Axiom Project
https://chromium.github.io/axiom/web_shell/
Apache License 2.0
53 stars 26 forks source link

HTERM window is wrongly sized + resizing causes exception on Linux #198

Open ussuri opened 9 years ago

ussuri commented 9 years ago

This happens on Linux only for me.

1) The virtual screen is taller than the physical tab: once the screen gets filled, the text at the bottom together with the command line prompt scrolls out of view, and the only way to get it visible again is to blindly type clear.

2) Might be related to 1): an attempt to resize the HTERM window results in an exception in the line with var r = ... in the following code:

TerminalView.resizeIframes = function() {
  if (TerminalView.raf_)
    return;

  TerminalView.raf_ = requestAnimationFrame(function() {
    TerminalView.raf_ = null;

    var container = TerminalView.getIframeContainer();
    for (var i = 0; i < container.children.length; i++) {
      var htermElem = container.children[i];
      var r = htermElem.followObject.getBoundingClientRect();
      htermElem.style.top = r.top + 'px';
      htermElem.style.left = r.left + 'px';
      htermElem.style.width = r.width + 'px';
      htermElem.style.height = r.height + 'px';
    }
  });
};

The exception says:

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined