From 57ecf927e7217e17997b60d80178a75bfbda1729 Mon Sep 17 00:00:00 2001 From: yan Date: Wed, 5 Oct 2016 17:33:21 -0700 Subject: [PATCH] Potential fix for URL bar lag. Fix #4360 Auditors: @bbondy Test Plan: 1. Open a bunch of tabs, or copy over a session-store-1 file with a bunch of tabs 2. Open a new tab and start typing 3. Observe if there is a lag between when you press a key and when the character shows up --- js/components/urlBar.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/components/urlBar.js b/js/components/urlBar.js index a8289f1bf4a..132ccb57840 100644 --- a/js/components/urlBar.js +++ b/js/components/urlBar.js @@ -48,7 +48,7 @@ class UrlBar extends ImmutableComponent { return windowStore.getFrame(this.props.activeFrameKey) } - isActive () { + get isActive () { return this.props.urlbar.get('active') } @@ -370,6 +370,9 @@ class UrlBar extends ImmutableComponent { } render () { + const value = !this.isActive || this.props.locationValueSuffix.length > 0 + ? this.locationValue + this.props.locationValueSuffix + : undefined return