Skip to content

Update Spotify app module to support recent versions of Spotify.#7689

Merged
michaelDCurran merged 2 commits into
nvaccess:masterfrom
jcsteh:newSpotify
Nov 23, 2017
Merged

Update Spotify app module to support recent versions of Spotify.#7689
michaelDCurran merged 2 commits into
nvaccess:masterfrom
jcsteh:newSpotify

Conversation

@jcsteh

@jcsteh jcsteh commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

Link to issue number:

None.

Summary of the issue:

Spotify doesn't fire focus on the correct object when it comes to the foreground (e.g. after alt+tab). I fixed this for an older version of Spotify in #5439, but this is broken in the current version of Spotify.

Description of how this pull request fixes the issue:

Spotify fires focus on an ancestor window instead of the correct focus. However, the trick we previously used to get the correct focus no longer works. Switch to a new trick which does work.

Testing performed:

Tested with Spotify 1.0.66.478.g1296534d:

  1. Verified that moving around the document in browse mode, searching and moving through a song list in focus mode does not result in focus loss.
  2. Verified that alt+tabbing out of Spotify and back in again restores focus to where it last was.
  3. Verified that searching and then pressing enter on an artist in the search results does not result in focus loss.

Known issues with pull request:

None known.

Change log entry:

In Bug Fixes:

- Focus is now once again restored correctly when returning to Spotify from another application. (#7689)

1. Spotify no longer fires focus on objects that die before we can fetch them, so remove the hack which worked around this.
2. Spotify still fires focus on an ancestor window instead of the correct focus. However, the trick we previously used to get the correct focus no longer works. Switch to a new trick which does work.

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bug annoys me in a major way :)

I assume using a FocusableUnfocusableContainer here doesn't do the job?

@jcsteh

jcsteh commented Oct 24, 2017 via email

Copy link
Copy Markdown
Contributor Author

…fore we can fetch them.

This happens far less than it does before, but it does still happen in some cases.
For example, it happens when pressing enter on an artist in search results.
@jcsteh

jcsteh commented Oct 24, 2017

Copy link
Copy Markdown
Contributor Author

I just reinstated the hack working around focus objects which die before we can fetch them. This happens far less than it does before, but it does still happen in some cases. For example, it happens when pressing enter on an artist in search results. I'm updating the initial comment accordingly.

feerrenrut added a commit that referenced this pull request Oct 31, 2017
Merge remote-tracking branch 'origin/pr/7689' into next
@michaelDCurran michaelDCurran merged commit bb35a6e into nvaccess:master Nov 23, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.4 milestone Nov 23, 2017
@jcsteh jcsteh deleted the newSpotify branch May 25, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants