diff options
| author | mrmr1993 | 2017-02-08 17:53:47 +0000 |
|---|---|---|
| committer | mrmr1993 | 2017-02-08 20:27:48 +0000 |
| commit | e053530dc82cdf202c67483d9148d006daab7979 (patch) | |
| tree | 2cef5cb6345660afe3711c97a16611fca14548f1 /background_scripts/main.coffee | |
| parent | bebedfa4e7abc45fc72ce961d28b6ee44f84b895 (diff) | |
| download | vimium-e053530dc82cdf202c67483d9148d006daab7979.tar.bz2 | |
Stop using deprecated key 'selected' of tabs; switch to 'active'
The documentation suggests that 'highlighted' is equivalent to
'selected'. However, multiple tabs can be highlighted in a window -- in
fact, everywhere 'selected' was used, we wanted the unique active tab.
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index e02cef4d..70739eae 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -99,7 +99,7 @@ TabOperations = tabConfig = url: Utils.convertToUrl request.url index: request.tab.index + 1 - selected: true + active: true windowId: request.tab.windowId openerTabId: request.tab.id chrome.tabs.create tabConfig, callback @@ -127,7 +127,7 @@ toggleMuteTab = do -> selectSpecificTab = (request) -> chrome.tabs.get(request.id, (tab) -> chrome.windows.update(tab.windowId, { focused: true }) - chrome.tabs.update(request.id, { selected: true })) + chrome.tabs.update(request.id, { active: true })) moveTab = ({count, tab, registryEntry}) -> count = -count if registryEntry.command == "moveTabLeft" @@ -238,7 +238,7 @@ selectTab = (direction, {count, tab}) -> Math.min tabs.length - 1, count - 1 when "last" Math.max 0, tabs.length - count - chrome.tabs.update tabs[toSelect].id, selected: true + chrome.tabs.update tabs[toSelect].id, active: true chrome.tabs.onUpdated.addListener (tabId, changeInfo, tab) -> return unless changeInfo.status == "loading" # Only do this once per URL change. |
