New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 692343 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2017
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Custom search engines bounce when select and unselect

Reported by ltian@chromium.org, Feb 15 2017

Issue description

Chrome Version: 58.0.3012.0
OS: Android

What steps will reproduce the problem?
(1) Go to duckduckgo.com and search some words (like "test")
(2) Go to m.so.com and search some words (like "test")
(3) Menu -> Settings -> Search engine
(4) Choose "m.so.com" and observe

What is the expected result?
"m.so.com" should stay in the bottom list

What happens instead?
"m.so.com" bounces to the top list.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06aa457920d30616cc4c47c23057714694e3b3a7

commit 06aa457920d30616cc4c47c23057714694e3b3a7
Author: ltian <ltian@chromium.org>
Date: Wed Feb 22 05:46:36 2017

[Android] Fix a custom search engine bounces when it selected and unselected as default engine

When there are mutliple custom search engines displayed on setting page,
selecting and unselecting all except the top one will make them bounce
between default list and custom engine list. The right behaivor should
be the selected custom engine should remain in the same place and be
updated next time loading the setting page.

It is caused using their indexes to decide whether two engines are the
same. However, selecting/unselecting a custom engine will make Chrome
reorder the engine list which changes the selected/unselected one's
index and forces Chrome to refresh the list on Android.

To fix it, index of a search engine should not be used to decide whether
two engines are the same.

BUG= 692343 

Review-Url: https://codereview.chromium.org/2691033007
Cr-Commit-Position: refs/heads/master@{#451890}

[modify] https://crrev.com/06aa457920d30616cc4c47c23057714694e3b3a7/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java
[modify] https://crrev.com/06aa457920d30616cc4c47c23057714694e3b3a7/chrome/android/java/src/org/chromium/chrome/browser/search_engines/TemplateUrlService.java

Comment 2 by ltian@chromium.org, Feb 22 2017

Status: Fixed (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 3 2017

Labels: merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/70335e0880ba8cbe86aad7e3e53965ec23c7c9b2

commit 70335e0880ba8cbe86aad7e3e53965ec23c7c9b2
Author: ltian <ltian@chromium.org>
Date: Fri Mar 03 20:41:56 2017

[Android] Fix a custom search engine bounces when it selected and unselected as default engine

When there are mutliple custom search engines displayed on setting page,
selecting and unselecting all except the top one will make them bounce
between default list and custom engine list. The right behaivor should
be the selected custom engine should remain in the same place and be
updated next time loading the setting page.

It is caused using their indexes to decide whether two engines are the
same. However, selecting/unselecting a custom engine will make Chrome
reorder the engine list which changes the selected/unselected one's
index and forces Chrome to refresh the list on Android.

To fix it, index of a search engine should not be used to decide whether
two engines are the same.

BUG= 692343 
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2691033007
Cr-Commit-Position: refs/heads/master@{#451890}
(cherry picked from commit 06aa457920d30616cc4c47c23057714694e3b3a7)

Review-Url: https://codereview.chromium.org/2729253002
Cr-Commit-Position: refs/branch-heads/2987@{#757}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/70335e0880ba8cbe86aad7e3e53965ec23c7c9b2/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java
[modify] https://crrev.com/70335e0880ba8cbe86aad7e3e53965ec23c7c9b2/chrome/android/java/src/org/chromium/chrome/browser/search_engines/TemplateUrlService.java

Sign in to add a comment