keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.39k stars 1.48k forks source link

Copying text from the Notes field by shortcut works wrong #11381

Closed lansman closed 1 month ago

lansman commented 1 month ago

Overview

Copying text from the Notes field by ctrl+c (cmd+c in case of Mac) shortcut copies Password instead of selected text

Steps to Reproduce

  1. Select any record
  2. Select any text in the record's Notes field
  3. Press ctrl+c (cmd+c on Mac)

Expected Behavior

The selected text should be copied

Actual Behavior

Record's Password field contents is copied instead

I believe the problem is that KeepassXC "copy password" shortcut overrides system shortcut and doesn't respect what UI control in the focus.

This logic should be changed to

if (FocusedUiElement() == "NotesField")
{
  CopySelectedNotesText()
}
else
{
  CopyPasswordField()
}

This is how it implemented in the original Keepass. I heavily use both and always stumble on this difference. How many times i had to change my password because fast automated by years subsequence of actions of my hands: "select notes text to google it" - "ctrl+c" - alt-tab to the browser - ctrl+t (open new tab with) - ctrl-v - "enter" exposed my password!

KeePassXC - VERSION 2.7.9 Operating System: macOS

droidmonkey commented 1 month ago

Fixed for next release