-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Keyboard shortcuts sometimes do not work until after a clicked command is executed #1724
Comments
Also, the shortcuts begin to work after if I context-click a file. |
When the focus shifts to other than the node of elFinder so elFinder become disabled. There is a UI option var options = {
url : 'php/connector.php',
enableAlways : true
}
$('#elfinder').elfinder(options); In addition, elFinder next version will have the client configuration option Thanks! |
But I click on a file in the finder and then issue the shortcut. Surely that should get the focus. Also I tried setting I would love to get this working, so any insight would be greatly appreciated. Thanks! |
Works for me on the demo, so something in my use-case must be stealing the focus. I am wrapping the component in Vaadin... |
execShortcut is not getting called until after I manually execute a command. Must be a jquery issue, as execShortcut is definitely getting registered. Also, opening the context menu is enough to get the callback working. No keyboard events are sent from jquery until after I run a command by clicking a command button. |
OK, I'll check it. |
jquery.dispatch is not getting called with the keydown event, so something is disabling, or re-enabling the on('keydown'). The click event works fine. |
@Flamenco I modified about an option |
Hi Nao-Pon, I spend a few hours on this today. First i thought it was because I had 2 jquery libraries, but dealing with that did not solve the problem. Then I thought it might be related to jquery v2.2. Next, I thought my issue was that there was another library calling The other library's keyup handler was is getting called, while the elFinder handler was not. So this breaks it and this fixes it.
Bottom Line: Registering a keyup listener causes the issue. Perhaps that needs to be handled when initially setting up handlers in elFinder? Thank you so much for your attention on this. Please let me know if you can repeat this. |
Actually, that did not fix the problem. Still can't figure this one out. :( I am running it inside an iframe. Maybe that's the issue... |
OK. Got it. The issue happens when running in elFinder inside an iframe. Putting this in index.html, it does not get called until a command is executed. Then it works from that point on. This works.
This was my quick hack.
So the not-breaking solution may be to add topDocument to the options, with a default value of document. And then bind events to that. |
@Flamenco Thanks for your debugging.
I think this is not good idea. It might trouble occurs when there is other content in the parent window. |
Yes, when my iframe closes, the keyboard input on spaces and return is completely broken. Thats why I called it a 'hack'. I think It may also break the preview window nav controls. |
@Flamenco I edited. Please try and check with |
+1 Nice Work Naoki! |
I click the file icon, then hit F2 or Space. The shortcut does not work.
Next, I manually click the preview icon and then close the preview.
Now all shortcuts work as expected.
Has anyone else seen this behavior? This is on a page with other JS libraries, so I am not sure who the culprit is.
The text was updated successfully, but these errors were encountered: