Ticket #3722 (accepted defect)

Opened 3 years ago

Last modified 2 days ago

Double clicking on empty area executes last item

Reported by: egmont Owned by: andrew_b
Priority: major Milestone: 4.8.25
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: on review Votes for changeset:


Forking from #3715:

Go to a directory which has fewer entries than the height of the panel widget.

Double click on the empty area at the bottom.

Actual behavior: The last item is executed (if executable) or entered (if directory or archive).

Expected behavior: Nothing (other than the last item getting selected on the first click).

Unexpected execution of a binary can potentially be quite dangerous, and it's sure unexpected to execute it if you double clicked somewhere else.

(Similary I'm wondering whether the leftmost and rightmost columns (the borders which aren't highlighted) should be excluded as well.)

Change History

comment:1 Changed 3 years ago by and

Yes makes sense to prevent execute of last element BY ACCIDENT of an inexperienced user.

comment:2 Changed 3 years ago by mooffie

The patch--

  • probably fails for "brief" listing.
  • doesn't address egmont's note about excluding left/right borders.
  • could have been nicer if it factored out MSG_MOUSE_DRAG's code for figuring out a file index from coordinates.

comment:3 Changed 3 years ago by and

Thanks mooffie, can you test next patch?

comment:4 Changed 3 years ago by mooffie

Have you considered idea #3 in my previous comment?

Some day we'll support drag & drop and then what? Will we duplicate these calculations for the 3rd time?

While MSG_MOUSE_DRAG also needs to know when the mouse cursor it outside the files, perhaps we can still share the code in a way that isn't inelegant.

comment:5 Changed 3 years ago by and

Honestly I was focused on MSG_MOUSE_CLICK bug fixing because I can reproduce egmonts findings about "Double clicking".

I don't want touch MSG_MOUSE_DRAG (and maybe break it) by fixing "double clicking" here.

comment:6 Changed 2 weeks ago by andrew_b

Branch: 3722_double_click_on_empty

Last edited 2 days ago by andrew_b (previous) (diff)

comment:7 Changed 2 weeks ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on hold

comment:8 Changed 2 days ago by andrew_b

  • Branch state changed from on hold to on review
  • Milestone changed from Future Releases to 4.8.25
Note: See TracTickets for help on using tickets.