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

shell.openItem does not move Finder to the top on OS X #2282

Closed
tengyifei opened this issue Jul 20, 2015 · 3 comments
Closed

shell.openItem does not move Finder to the top on OS X #2282

tengyifei opened this issue Jul 20, 2015 · 3 comments

Comments

@tengyifei
Copy link

require('remote').require('shell').openItem('/');

Opens Finder but leaves it behind all other windows.

@zcbenz
Copy link
Member

zcbenz commented Jul 21, 2015

openItem just opens the URI with default application, whether the default application takes focus depends on itself. In your case you should use showItemInFolder.

@zcbenz zcbenz closed this as completed Jul 21, 2015
@dcposch
Copy link
Contributor

dcposch commented Mar 14, 2016

@zcbenz I'm running into this same problem. I tried both openItem and showItemInFolder. Both of them ensure that the folder is open, but neither of them focus the folder window.

(That means you might click, say, "Open folder" in an electron app. It calls shell.openItem or showItemInFolder. Either way, the folder is still at the bottom of a stack of windows and the user thinks nothing happened.)

@wangxiexe
Copy link

wangxiexe commented Dec 16, 2016

is it possible to add an option to openItem to make it foreground ? as it does help to open the directory instead of just show it in the parent folder which requires user one more click. @zcbenz

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

4 participants