Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
Fix mac copy user/pass shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell committed Oct 15, 2021
1 parent 249244c commit 3cb0d3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/components/vault/EntriesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const EntriesList = ({ className }) => {
arrowUp: 'up',
arrowDown: 'down',
enter: 'enter',
copyUsername: 'ctrl+b',
copyPassword: 'ctrl+c'
copyUsername: ['ctrl+b', 'command+b'],
copyPassword: ['ctrl+c', 'command+c']
};
const handleNavigation = (event, step) => {
event.preventDefault();
Expand Down Expand Up @@ -57,10 +57,14 @@ const EntriesList = ({ className }) => {
document.activeElement.click();
}
},
copyUsername: () =>
handleCopyField(entries[currentIndex].fields.find(field => field.title === 'Username')),
copyPassword: () =>
handleCopyField(entries[currentIndex].fields.find(field => field.title === 'Password'))
copyUsername: e => {
e.preventDefault();
handleCopyField(entries[currentIndex].fields.find(field => field.title === 'Username'));
},
copyPassword: e => {
e.preventDefault();
handleCopyField(entries[currentIndex].fields.find(field => field.title === 'Password'));
}
};

return (
Expand Down
1 change: 0 additions & 1 deletion src/components/vault/EntryDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@ const FieldRow = ({
{field.property === 'url' ? (
<a
onClick={e => {
console.log(e);
(e.ctrlKey || e.metaKey) && window.open(field.value, '_blank');
}}
title="open with Ctrl/Cmd + click"
Expand Down

0 comments on commit 3cb0d3a

Please sign in to comment.