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

Issue 756249 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

History info button should be hidden when exit back to a scrolled position from search mode

Project Member Reported by huayinz@chromium.org, Aug 16 2017

Issue description

Chrome Version: 62.0.3187.0
OS: Android

What steps will reproduce the problem?
(1) Sign in
(2) Go to history
(3) Scroll until info button is not visible
(4) Let the scrolling animation finish, and press "search" button
(5) Press "back" button in search mode

What is the expected result?
Info button should be hidden as it is before entering search mode.

What happens instead?
Info button is shown.

 
history_info_button.mp4
719 KB View Download

Comment 1 by k...@chromium.org, Aug 17 2017

Components: UI>Browser>Mobile>NavPanel
Labels: Fine-Pri-1.9 Hotlist-Chrome-Home

Comment 2 by kings...@google.com, Aug 17 2017

Labels: -Fine-Pri-1.9 Fine-Pri-2.2
Strange behavior on toolbar button when checking LinearLayoutManager#firstVisibleItemPosition() before it has available positions.
check_first_position_before_binding.mp4
2.1 MB View Download
Before a RecyclerView binds it's items, #firstVisibleItemPosition returns NO_POSITION. We were seeing issues in Chrome Home when using strict equality to see if the first visible item == 0 (the header). Initially the info icon would be hidden (since #firstVisibleItemPosition returned NO_POSITION). After the items were bound, it would be set to visible causing the info icon to take the place of the search icon (this is what's shown in the video above). As soon as the user interacted with the toolbar, a layout was triggered and both buttons became visible.

Since this only happened in Chrome Home, we think that the toolbar being attached and reattached may have something to do with it.

The solution we opted for was to use firstVisibleItemPosition <= 0. We want to hide the info toggle if the header is scrolled off. If #firstVisibleItemPosition() returns NO_POSITION because initialization hasn't completed, we can safely set the info icon as visible based on the other criteria used for determining whether it should be displayed.
Status: Fixed (was: Assigned)

Sign in to add a comment