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

Menu is removed before item actions are completed. #231

Open
Abramo-Bagnara opened this issue Nov 30, 2022 · 1 comment
Open

Menu is removed before item actions are completed. #231

Abramo-Bagnara opened this issue Nov 30, 2022 · 1 comment

Comments

@Abramo-Bagnara
Copy link

Abramo-Bagnara commented Nov 30, 2022

I need to put a <input type="file"> as a menu item, but as the file chooser dialog steal the focus, the menu is removed from DOM and then the change event from input element is not fired.

Of course closeOnClick does not help as the problem is due to focus loss.

Do we have a way to avoid that menu is removed (e.g. just hiding it)?

@Abramo-Bagnara
Copy link
Author

Not that I like the solution very much, but I've been able to make it work as expected using animation="show" and the following css:

.contexify_willEnter-show {
  display: block;
}

.contexify_willLeave-show {
  display: none;
  animation-duration: 1000s;
}

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

No branches or pull requests

1 participant