Login/Password Fields: Fix pressing 'c' on Safari.

This commit is contained in:
Nate 2020-09-24 11:15:53 -06:00
parent bfccd8170a
commit 02d71cc0ef
1 changed files with 18 additions and 2 deletions

View File

@ -507,11 +507,27 @@
{if $settings.theme.keyboard_shortcut_copy_enabled}
{if $browser_name_short == 'Safari'} //emulate with detecting [c] only, as [command] and [control] keys are ignored when captured
{literal}
if ((e.which == 99 || e.which == 67) && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'TEXTAREA') {
if (
(e.which == 99 || e.which == 67) &&
!(e.target.tagName == 'INPUT' && e.target.type == 'text') &&
!(e.target.tagName == 'INPUT' && e.target.type == 'password') &&
e.target.tagName != 'TEXTAREA'
) {
{/literal}
{else}
{literal}
if ((((e.which == 99 || e.which == 67) && (e.ctrlKey || e.metaKey) && !e.shiftKey) || (e.which == 19)) && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'TEXTAREA') {
if (
(
(
(e.which == 99 || e.which == 67) &&
(e.ctrlKey || e.metaKey) &&
!e.shiftKey
) ||
e.which == 19
) &&
!(e.target.tagName == 'INPUT' && e.target.type == 'text') &&
e.target.tagName != 'TEXTAREA'
) {
{/literal}
{/if}
{literal}