Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix focus in filepicker #1711

Merged
merged 1 commit into from
Apr 13, 2023
Merged

fix focus in filepicker #1711

merged 1 commit into from
Apr 13, 2023

Conversation

hamza221
Copy link
Contributor

A really hacky way to fix focus in the file picker focus

Repro:

  1. open photos settings
  2. open file picker to change the default photos directory
  3. try navigating with keyboard or creating a new folder

PS: Manually focusing and changing tabindex didn't work

@hamza221 hamza221 self-assigned this Mar 26, 2023
@hamza221 hamza221 added bug Something isn't working 3. to review Waiting for reviews labels Mar 26, 2023
@ChristophWurst
Copy link
Member

could you elaborate on the solution? you're watching the document body and move the dialogs element into the modal, right?

would it also be possible to register the dialogs element as additional focus trap elements for the modal?

@hamza221
Copy link
Contributor Author

hamza221 commented Apr 3, 2023

changing to WIP until nextcloud-libraries/nextcloud-vue#3947 gets merged

@hamza221 hamza221 changed the title fix focus in filepicker (WIP) fix focus in filepicker Apr 3, 2023
@hamza221 hamza221 marked this pull request as draft April 3, 2023 00:20
@hamza221 hamza221 added 2. developing Work in progress and removed 2. developing Work in progress 3. to review Waiting for reviews labels Apr 3, 2023
@hamza221 hamza221 marked this pull request as ready for review April 11, 2023 14:37
@hamza221 hamza221 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 11, 2023
@hamza221 hamza221 changed the title (WIP) fix focus in filepicker fix focus in filepicker Apr 11, 2023
@ChristophWurst ChristophWurst requested review from artonge and removed request for skjnldsv April 12, 2023 09:27
Copy link
Collaborator

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Works, but the behavior is still weird, as you can focus items from the setting modal behind the file picker. Shouldn't the file picker still the focus? If so, shouldn't the solution be in nc/dialogs?

@artonge
Copy link
Collaborator

artonge commented Apr 12, 2023

/rebase

@artonge
Copy link
Collaborator

artonge commented Apr 12, 2023

Rebasing to have green CI

@ChristophWurst
Copy link
Member

ChristophWurst commented Apr 12, 2023

If so, shouldn't the solution be in nc/dialogs?

yeah nextcloud-libraries/nextcloud-dialogs#1 🥲 Right now the picker is built with jquery UI.

@artonge
Copy link
Collaborator

artonge commented Apr 13, 2023

/compile amend /

@artonge
Copy link
Collaborator

artonge commented Apr 13, 2023

@hamza221 can you squash your fixups ?

Signed-off-by: hamza221 <hamzamahjoubi221@gmail.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member

squashed

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 13, 2023
@ChristophWurst ChristophWurst merged commit 8050873 into master Apr 13, 2023
@ChristophWurst ChristophWurst deleted the bug/filepicker-focus branch April 13, 2023 09:31
@ChristophWurst
Copy link
Member

/backport to stable26

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request Pending backport by the backport-bot label Apr 13, 2023
@ChristophWurst
Copy link
Member

/backport to stable25

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable25
git pull origin/stable25

# Create the new backport branch
git checkout -b fix/foo-stable25

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@backportbot-nextcloud backportbot-nextcloud bot removed the backport-request Pending backport by the backport-bot label Apr 13, 2023
@ChristophWurst
Copy link
Member

@artonge is it safe to backport the change to 25 considering the nc/vue bump in here?

@artonge
Copy link
Collaborator

artonge commented Apr 13, 2023

Should be safe for 25 yes, can you try and test?

@ChristophWurst
Copy link
Member

No luck so far #1741 (comment)

@artonge
Copy link
Collaborator

artonge commented Apr 24, 2023

Is this still needed after nextcloud/server#37780 ?

@hamza221
Copy link
Contributor Author

Is this still needed after nextcloud/server#37780 ?

It's not, I think we can revert this

@artonge
Copy link
Collaborator

artonge commented Apr 24, 2023

Is this still needed after nextcloud/server#37780 ?

It's not, I think we can revert this

Can you handle it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants