From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 9 Jul 2020 11:16:30 -0400 Subject: fix: check IsSecureEventInputEnabled in constructor before setting SetPasswordInputEnabled to true It appears that macOS 12 has IsSecureEventInputEnabled set to true initially. diff --git a/ui/base/cocoa/secure_password_input.mm b/ui/base/cocoa/secure_password_input.mm index c9d003216ec51407d80b2c3ed0a77e747d203069..f10829d7fe369d2419bb1f0828d6d1ec7c8f57e1 100644 --- a/ui/base/cocoa/secure_password_input.mm +++ b/ui/base/cocoa/secure_password_input.mm @@ -41,7 +41,7 @@ void SetPasswordInputEnabled(bool enabled) { namespace ui { ScopedPasswordInputEnabler::ScopedPasswordInputEnabler() { - if (!g_password_input_counter) { + if (!g_password_input_counter && !IsSecureEventInputEnabled()) { SetPasswordInputEnabled(true); } ++g_password_input_counter;