From 164470c1022a9a5fdfe81b38b6b462a66afce47f Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sun, 9 Apr 2023 14:44:52 +0900 Subject: [PATCH] Fix issue with the window becoming unresponsive in some cases --- Color Picker.xcodeproj/project.pbxproj | 2 +- Color Picker/Utilities.swift | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Color Picker.xcodeproj/project.pbxproj b/Color Picker.xcodeproj/project.pbxproj index b583c24..a7db588 100644 --- a/Color Picker.xcodeproj/project.pbxproj +++ b/Color Picker.xcodeproj/project.pbxproj @@ -641,7 +641,7 @@ repositoryURL = "https://github.com/getsentry/sentry-cocoa"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 8.3.3; + minimumVersion = 8.4.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Color Picker/Utilities.swift b/Color Picker/Utilities.swift index 306eb37..2b78cee 100644 --- a/Color Picker/Utilities.swift +++ b/Color Picker/Utilities.swift @@ -1064,7 +1064,7 @@ struct NativeTextField: NSViewRepresentable { // Cannot be `.leftMouseUp` as the color wheel swallows it. localEventMonitor = LocalEventMonitor(events: [.leftMouseDown, .rightMouseDown, .keyDown]) { [weak self] event in guard let self else { - return nil + return event } if event.type == .keyDown { @@ -1080,7 +1080,6 @@ struct NativeTextField: NSViewRepresentable { if !frame.insetBy(dx: -clickMargin, dy: -clickMargin).contains(clickPoint) { unfocus() - return nil } else { parent.isFocused = true }