Opened 8 years ago

Closed 5 days ago

#13151 closed bug (fixed)

BFilePanel empty after pressing ESC

Reported by: humdinger Owned by: jscipione
Priority: normal Milestone: R1/beta6
Component: Kits/libtracker.so Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #13643
Platform: All

Description

This is hrev50808.

If a filepanel is used in B_DIRECTORY_NODE mode and the user presses ESC, all the contents in the panel disappears. I first saw it with BurnItNow, confirmed it in Ubertuber and can replicate with Expander's destination file panel. Are there other apps using B_DIRECTORY_NODE?

Weirdly, it shows also in Expander's source panel, which uses B_FILE_NODE mode. But it doesn't show with any other open file dialog I checked, not in StyledEdit, Pe, ShowImage...

Could this be related to the even more annoying "Missing shortcuts in file panels", #11979 ?

Attachments (2)

0001-Always-let-ESCAPE-key-close-file-panel.patch (995 bytes ) - added by owenca 7 years ago.
0001-Make-Esc-and-Alt-Up-keys-work-for-file-panels.patch (1.2 KB ) - added by owenca 7 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 by axeld, 8 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:2 by waddlesplash, 8 years ago

Component: Kits/Storage KitKits/libtracker.so

comment:3 by owenca, 7 years ago

I don't think it's related to #11979. See the attached patch below.

comment:4 by owenca, 7 years ago

patch: 01

comment:5 by humdinger, 7 years ago

Owner: changed from nobody to waddlesplash

comment:6 by humdinger, 7 years ago

I locally applied this patch and the one from #11979, build Tracker, put it and the libtracker.so into non-packaged and blacklisted the system Tracker and libtracker.so in the boot options.

For some reason, upon booting I'm greeted with an empty blue desktop and an empty title-less window...

comment:7 by owenca, 7 years ago

Please see the updated patch. I'm not sure if we still want to make Atl-W close the file panel because Esc will do the job.

Also, the Esc key still clears the file list view before closing the panel. It seems to be a bug in Tracker. I don't know if we want to not send Esc to Tracker before closing the panel so as to avoid the bug.

comment:8 by humdinger, 7 years ago

We should keep ALT+W, it's a system wide shortcut.
I think the ESC handling should be: if something's filtered with type-ahead-filtering, ESC clears that filter. Only if nothing is filtered, ESC closes the panel.

comment:9 by pulkomandy, 7 years ago

I would prefer if ESC did not close windows, especially if it depends on the context.

As a vim user, I tend to press ESC a lot as this is how you switch mdoes in vim. I find it very annoying when it closes a window without a warning. So we should restrict that to very few cases, and I'm not sure file panels are one of these, because closing them may lose some state (maybe you navigated to a specific directory, carefully searched for the right file in there, etc).

comment:10 by humdinger, 7 years ago

I'm pretty sure file panel always used to be closable with ESC. It just doesn't always work for all apps for some reason.

Personally, not being a vim user (shocker!), ESC is synonymous to "Cancel". I save about a hundred mouse miles with my finger hovering near ESC instead of aim and click a "Cancel" button or even tinyer close widget.

comment:11 by diver, 7 years ago

FWIW, I'm with humdinger here.

comment:12 by pulkomandy, 7 years ago

Depending on the context:

  • If you are renaming a file, ESC aborts that operation
  • If you are using filtering, ESC aborts that operation
  • If you are not doing either, ESC closes the whole window

I find it annoying that the same key can be used for the third case. I would allow this only in windows where ESC is not used for anything else. There's already Alt+W if you need to close the window from the keyboard, and this one always work no matter what you are doing (renaming a file, filtering, ...).

comment:13 by humdinger, 7 years ago

My opinion differs. I see your 3rd item as also "aborting that operation". The operation being open/save a file via file dialog. I agree that using ESC to close the main window of an app would be bad (in most cases). But the open/save dialog is only a sub-process, an operation, in your work flow within that app.

comment:14 by humdinger, 7 years ago

Please also see my comment at ticket:11979#comment:22

comment:15 by owenca, 7 years ago

patch: 10

comment:16 by humdinger, 6 years ago

Maybe related: pressing ESC in a query result window also clears away all items.

comment:17 by diver, 3 years ago

Was this patch migrated to gerrit? Couldn't find it there.

comment:18 by diver, 3 years ago

Blocking: 13643 added

comment:19 by jscipione, 5 days ago

Owner: changed from waddlesplash to jscipione

PR to fix: https://review.haiku-os.org/c/haiku/+/8689

The reason you see this bug in Expander and not in StyledEdit, Pe, ShowImage is because Expander has a ref filter applied while those other apps don't. The patch set does a better job of differentiating between ref filtering and type-ahead filtering.

comment:20 by waddlesplash, 5 days ago

Milestone: UnscheduledR1/beta6
Resolution: fixed
Status: assignedclosed

Fix merged in hrev58432.

Note: See TracTickets for help on using tickets.