WebPositive: do not change URL while user is editing it

If you edit the URL while a page is loading, the URL could be changed
from the page load process, losing your edits.

We now check and update the URL only if the URL bar is currently not
focused, so it is possible to edit the URL safely.
This commit is contained in:
Adrien Destugues
2016-10-31 09:22:35 +01:00
parent cf65729463
commit 905ee3fb8f
+4
View File
@@ -666,6 +666,10 @@ URLInputGroup::TextView() const
void
URLInputGroup::SetText(const char* text)
{
// Ignore setting the text, if the user is currently editing the URL.
if (fWindowActive && fTextView->IsFocus())
return;
if (!text || !Text() || strcmp(Text(), text) != 0) {
fTextView->SetUpdateAutoCompleterChoices(false);
fTextView->SetText(text);