Ticket #3722 (closed defect: fixed)
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: | merged | Votes for changeset: | committed-master |
Description
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.)
Attachments
Change History
Changed 8 years ago by and
- Attachment mc-3722-prevent-execute-last-element-on-empty-area.patch added
comment:2 Changed 8 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.
Changed 8 years ago by and
- Attachment mc-3722-prevent-execute-last-element-on-empty-area-v2.patch added
comment:4 Changed 8 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 8 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 5 years ago by andrew_b
Branch: 3722_double_click_on_empty
changeset:bf9060d22d73059b8c940c7bfb79d4a7503147b9
comment:7 Changed 5 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Branch state changed from no branch to on hold
comment:8 Changed 5 years ago by andrew_b
- Branch state changed from on hold to on review
- Milestone changed from Future Releases to 4.8.25
comment:9 Changed 5 years ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:10 Changed 5 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [647c431b27370723140bc78334c78ff5375774ed].
Yes makes sense to prevent execute of last element BY ACCIDENT of an inexperienced user.