-
Notifications
You must be signed in to change notification settings - Fork 971
Commit
Follow up tweak for #5389 The fix for the JS error in 83eccb5 actually introduced some test failures because that JS error was saving this code from getting hit. This makes the tests pass and is more logical, if the prevState is selected and the current state it not selected, we don't want to select Auditors: @diracdeltas
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,10 +371,10 @@ class UrlBar extends ImmutableComponent { | |
} | ||
} | ||
} | ||
if (this.isFocused() !== prevProps.urlbar.get('focused')) { | ||
if (this.isFocused() && !prevProps.urlbar.get('focused')) { | ||
this.updateDOMInputFocus() | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bbondy
Author
Member
|
||
} | ||
if (this.isSelected() !== prevProps.urlbar.get('selected')) { | ||
if (this.isSelected() && !prevProps.urlbar.get('selected')) { | ||
this.select() | ||
windowActions.setUrlBarSelected(false) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bbondy
Author
Member
|
||
} | ||
|
updateDOMInputFocus takes a
focused
argument, which is missing here, so i think this does nothing. my other PR addressed that by getting rid of the arg