pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.35k stars 141 forks source link

"Show in Explorer" from right clicked file explorer context menu, open Explorer on background #1088

Open LAGENCECREE opened 2 months ago

LAGENCECREE commented 2 months ago

Thanks in advance for your bug report!

What happened?

"Show in Explorer" from right clicked file explorer context menu, open Explorer on the background of pulsar (the system explorer window dont receive the focus or at least do not open over the pulsar window)

Pulsar version

1.118

Which OS does this happen on?

🪟 Windows

OS details

11

Which CPU architecture are you running this on?

None

What steps are needed to reproduce this?

On the file explorer panel, Right-click a Folder Click on "Show in explorer"

Additional Information:

I observed this bug too in the past , on windows 10 with atom editor

confused-Techie commented 2 months ago

Thanks a ton for reporting this issue!

Looking into this, the way we currently open the file explorer occurs here.

Which essentially boils down to:

const shell = require('electron').shell;
shell.showItemInFolder(filePath);

Looking into it I can find some reports of the same behavior, such as here.

Which suggests that a solution would look like:

const shell = require('electron').remote.shell;
shell.showItemInFolder(filePath);

Although, I haven't done the testing or research to see if we would be able to do this.

LAGENCECREE commented 2 months ago

thanks to you ! i guess i have to compile my own pulsar to test that, i will try asap if i can (not sure) or wait to be fixed by core devs in a future release 🙏

LAGENCECREE commented 2 months ago

Hello

without the time to fix it on the core package i created a custom package that fix it, at least on windows,

trought a "📂 Show with explorer+" entry added on the right-click context menu of the explorer pane.

output

i'm open to publish on the community package list but i dont know how

savetheclocktower commented 2 months ago

These directions are pretty thorough, though they probably need an update. You'll want to run ppm login to authenticate beforehand.

Make sure the package.json points to the correct GitHub repo and that you authenticate as the user that the repo is hosted on.