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

can't select favorites #206

Closed
stdweird opened this issue Sep 14, 2023 · 11 comments · Fixed by #207
Closed

can't select favorites #206

stdweird opened this issue Sep 14, 2023 · 11 comments · Fixed by #207

Comments

@stdweird
Copy link
Contributor

i have OOD 2.0.29 and filepicker 1.0.0.

the picker is for selecting directories and i have bunch of favorites defined.

however, when i select a favorite, and then press the select button, nothing is done.
i need to select one of the subdirs first. and also strange (or even buggy?) i can't select the . or .. dirs.

this makes the favorites a bit useless in our case, as i can't select the favorites themself

@stdweird
Copy link
Contributor Author

there was nothing in the release notes of v3 about this, so i haven tried (and it's not trivial for me to update anyway)

@johrstrom
Copy link
Contributor

There's likely some bug here in this library. I may be able to get around to this, but this library is being replaced with a native ood widget in OSC/ondemand#1571 that will come with OnDemand 3.1.

@stdweird
Copy link
Contributor Author

if you have some vague idea where i should look, i can give it a try myself. probably something simple is missing, but i'm not sure where to start looking

@stdweird
Copy link
Contributor Author

i only now also see this is a dupe of #204

@johrstrom
Copy link
Contributor

here's the event handler for when things are clicked. that may be a starting point.

menuClicked: function(entry, event) {

@stdweird
Copy link
Contributor Author

@johrstrom i think the fix might be simple: when a menu is clicked (but most likely also when an entry is doubleclicked), the this.staged_value should be set to this.path.
i'll test this, but i can't easily think of a reason why not to do this.

with current code, it looks like if eg you select a file, and then later click the menu or double click a directory entry; the last entry that was clicked is the one that is still considered as "selected"; even when the viewer is showing something entirely different. that makes no sense imho.

@stdweird
Copy link
Contributor Author

@johrstrom i confirm the PR fixes the behaviour.

@johrstrom
Copy link
Contributor

I'm having trouble replicating. I see your initial comment you're using v1.0.0. Can you replicate the issue with the latest version?

https://github.com/OSC/bc_js_filepicker/releases/tag/v3.0.1

@stdweird
Copy link
Contributor Author

@johrstrom how odd. the patch is against current master, so there is no way in the code that clikcing the menu would set the staged_value. anyway, will give it a try

@stdweird
Copy link
Contributor Author

@johrstrom with 3.0.1 menuclick does not work, but doubleclick does seem to work (still odd, maybe i mistested it in 1.0.0 as well). see webm screencast https://we.tl/t-AWlQosNQ71

@stdweird
Copy link
Contributor Author

i retested it with 1.0.0. doubleclick indeed works (maybe it always triggers a single click?)
anyway, i adapted the PR to only fix the favorites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants