Electron: `shell.openItem` does not move Finder to the top on OS X

Created on 20 Jul 2015  路  3Comments  路  Source: electron/electron

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

Opens Finder but leaves it behind all other windows.

All 3 comments

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 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.)

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

feross picture feross  路  3Comments

EladBezalel picture EladBezalel  路  3Comments

reggi picture reggi  路  3Comments

christiangenco picture christiangenco  路  3Comments

dangan-ronpa picture dangan-ronpa  路  3Comments