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

Issue 740432 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

chrome.tabs.highlight needs clearer documentation

Reported by vitaly.z...@gmail.com, Jul 10 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. Write on js console of the extension `chrome.tabs.highlight({'tabs': 0})`

What is the expected behavior?
Some highlight of the first tab.

What went wrong?
Nothing happened - no error and no highlight. Also in documentation https://developer.chrome.com/extensions/tabs#method-highlight expected to see apng with highlighting in action.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3071.115  Channel: stable
OS Version: OS X 10.12.5
Flash Version:
 

Comment 1 by woxxom@gmail.com, Jul 10 2017

The documentation and the method name are indeed a bit misleading.

Highlighting isn't an animation.
It's the functionality of Ctrl-click on tab title in the tab strip to select multiple tabs.
Ctrl-clicking on not yet selected tab selects and focuses it.

Anyway, chrome.tabs.highlight({tabs: 0}) is working as expected:
it sets the tab selection to just one tab (the first one in the window), 
which means that this tab gets focused or nothing happens if it was already focused.

Ok, thank you for the answer - so no way to visually highlight some tab?

Comment 3 by woxxom@gmail.com, Jul 10 2017

There's no API to animate a tab. To draw the user's attention you can change the favicon of the page. Even animate the favicon via canvas. Or change the document.title by prefixing it with some symbols in a setInterval loop. For example prepend with a dot •, pause for 1000ms, change it to a space. In the '80s text based UI imitated "busy" state spinners by displaying / — \ | symbols in one position sequentially.
Components: Platform>Extensions>Documentation
Labels: OS-Chrome OS-Linux OS-Windows
[mac bug triage]

Just updating this bug with more information to get it out of our triage queue :)
@woxxom, thank you for your thoughts about animation!

I have no questions anymore, hope that you will update documentation (or/and rename `highlight` to maybe `switch`) for future visitors.
Cc: ranjitkan@chromium.org
Status: Untriaged (was: Unconfirmed)
Could some one from documentation review it. Untriaged it so that it gets addressed.

Thanks.!
Cc: rdevlin....@chromium.org catmulli...@chromium.org
Status: Available (was: Untriaged)
Summary: chrome.tabs.highlight needs clearer documentation (was: chrome.tabs.highlight: looks like do not works - and also bad documented)
We probably won't change the name of the method, since that would break existing extensions.  But we can change the documentation to be a bit more clear.
Cc: -catmulli...@chromium.org
documentation -> crystallambert@
Owner: crystallambert@chromium.org
Status: Assigned (was: Available)
-> crystallambert@ for realz.
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 16 2018

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

commit 70df9cff39903a4add892695dc098bb14688449d
Author: CrystalFaith <crystallambert@chromium.org>
Date: Fri Mar 16 20:47:24 2018

[Extension API Docs]Update tabs.highlight language

Updated description for clarity.

Bug: 740432
Change-Id: Ic7c8c7f96738d77c7b188e0b08d637f97b7bc31f
Reviewed-on: https://chromium-review.googlesource.com/957864
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Crystal Lambert <crystallambert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543817}
[modify] https://crrev.com/70df9cff39903a4add892695dc098bb14688449d/chrome/common/extensions/api/tabs.json

Sign in to add a comment