Skip to content
Permalink
Browse files

For the in engine web browser only go to an altered address bar when …

…enter is pressed and not when it loses focus.

Summary: Fixes T2411.

Test Plan: Open the in engine web browser. Type in a new url. Click somewhere else. The web page won't change. Click back in the address bar and hit enter. It will go the provided url.

Reviewers: #zero_engine_developers, trevor.sundberg

Reviewed By: #zero_engine_developers, trevor.sundberg

Subscribers: trevor.sundberg, dane.curbow

Maniphest Tasks: T2411

Differential Revision: https://dev.zeroengine.io/D745
  • Loading branch information...
danecurbow authored and TrevorSundberg committed Sep 28, 2018
1 parent 753d5cf commit 4b6cbc80f40dd6fed48813cc7182f2694da36ca4
Showing with 3 additions and 3 deletions.
  1. +2 −2 Extensions/Gameplay/WebBrowserWidget.cpp
  2. +1 −1 Extensions/Gameplay/WebBrowserWidget.hpp
@@ -79,7 +79,7 @@ WebBrowserWidget::WebBrowserWidget(Composite* composite, const WebBrowserSetup&

ConnectThisTo(Z::gEngine, Events::EngineUpdate, OnEngineUpdate);

ConnectThisTo(mAddressText, Events::TextSubmit, OnAddressTextSubmit);
ConnectThisTo(mAddressText, Events::TextEnter, OnAddressTextEnter);

ConnectThisTo(browser, Events::WebBrowserPopup, OnWebBrowserPopup);
ConnectThisTo(browser, Events::WebBrowserPointQuery, OnWebBrowserPointQuery);
@@ -200,7 +200,7 @@ void WebBrowserWidget::OnReloadPressed(ObjectEvent* event)
mBrowser->Reload(useCache);
}

void WebBrowserWidget::OnAddressTextSubmit(ObjectEvent* event)
void WebBrowserWidget::OnAddressTextEnter(ObjectEvent* event)
{
mBrowser->SetUrl(mAddressText->GetText());
}
@@ -19,7 +19,7 @@ class WebBrowserWidget : public Composite
void OnBackPressed(ObjectEvent* event);
void OnForwardPressed(ObjectEvent* event);
void OnReloadPressed(ObjectEvent* event);
void OnAddressTextSubmit(ObjectEvent* event);
void OnAddressTextEnter(ObjectEvent* event);

void OnWebBrowserPopup(WebBrowserPopupCreateEvent* event);
void OnWebBrowserPointQuery(WebBrowserPointQueryEvent* event);

0 comments on commit 4b6cbc8

Please sign in to comment.
You can’t perform that action at this time.