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

On new tab don't clear URL bar #3105

Merged
merged 1 commit into from
Aug 13, 2016
Merged

Conversation

ayumi
Copy link
Contributor

@ayumi ayumi commented Aug 11, 2016

Fix #2197
Fix #2812

Adds a check in windowStore.js WINDOW_SET_NAVIGATED for new tab.

I'm not sure if this is a legit way to check for a new tab, but it fixes the problem for me :)

@bridiver
Copy link
Collaborator

there is definitely a larger problem that needs to be addressed because this happens in other places as well due to input/state change race conditions, but I think this is a good workaround. It's actually possible to detect this using NavigationController::IsInitialBlankNavigation, but we don't currently expose that from electron. I'm wondering if it might be better to make isInitialBlankNavigation a frameProp which then controls whether or not updateNavBarInput gets called or not? That would make it somewhat testable because we can unit test FrameStateUtil.addFrame for the isInitialBlankNavigation property (should be false for cloned and restored tabs as well as frames created with location). We can always refactor later too, but the actual issue is very hard to write a test for so just thinking about some way that we can have some testing around it.

@bbondy
Copy link
Member

bbondy commented Aug 13, 2016

I posted this to track the deeper fix:
#3162

And I'll merge this for now since it should be an improvement from what we have now.

@bbondy bbondy merged commit 227a83c into brave:master Aug 13, 2016
@ayumi ayumi deleted the new-tab-url-bar-no-empty branch August 13, 2016 04:14
@luixxiul luixxiul added this to the 0.11.5dev milestone Aug 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants