Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Potential fix for URL bar lag.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
diracdeltas committed Oct 6, 2016
1 parent 27bd13f commit 57ecf92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/components/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class UrlBar extends ImmutableComponent {
return windowStore.getFrame(this.props.activeFrameKey)
}

isActive () {
get isActive () {
return this.props.urlbar.get('active')
}

Expand Down Expand Up @@ -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 <form
className='urlbarForm'
action='#'
Expand Down Expand Up @@ -412,10 +415,10 @@ class UrlBar extends ImmutableComponent {
onFocus={this.onFocus}
onBlur={this.onBlur}
onKeyDown={this.onKeyDown}
onChange={this.onChange}
onKeyUp={this.onChange}
onClick={this.onClick}
onContextMenu={this.onContextMenu}
value={this.locationValue + this.props.locationValueSuffix}
value={value}
data-l10n-id='urlbar'
className={cx({
insecure: !this.props.isSecure && this.props.loading === false && !this.isHTTPPage,
Expand Down

1 comment on commit 57ecf92

@diracdeltas
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this appears to be causing a bunch of problems; reverting for now

Please sign in to comment.