Ticket #27403: possible-fix.patch

File possible-fix.patch, 1.3 KB (added by mcs, 14 months ago)

a possible fix (needs work)

  • browser/extensions/onboarding/content/onboarding.js

    diff --git a/browser/extensions/onboarding/content/onboarding.js b/browser/extensions/onboarding/content/onboarding.js
    index 1f46abdb722d..0dec9f712b95 100644
    a b class Onboarding { 
    638638    telemetry({
    639639      type: "onboarding-session-begin",
    640640      session_key: this._session_key,
    641641    });
    642642  }
    643643
    644644  _resizeUI() {
    645645    this._windowWidth = this._window.document.body.getBoundingClientRect().width;
     646dump("onboarding - _resizeUI - width: " + this._windowWidth + "\n");
     647dump("onboarding - _resizeUI - height: " + this._window.document.body.getBoundingClientRect().height + "\n");
     648    if (this._windowWidth == 0) {
     649      // The document is hidden. Since Torbutton keeps the about:tor body
     650      // hidden until the tor on/off state has been determined, try again
     651      // in a little while.
     652      this._window.requestIdleCallback(() => this._resizeUI());
     653// TODO: prevent infinite loop
     654    }
     655
    646656    if (this._windowWidth < ONBOARDING_MIN_WIDTH_PX) {
    647657      // Don't show the overlay UI before we get to a better, responsive design.
    648658      this.destroy();
    649659      return;
    650660    }
    651661
    652662    this._initUI();
    653663    // For Tor Browser, show the "Let's get started" speech bubble until each