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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user