fix: first mouse not dragging BrowserView (#31062)

This commit is contained in:
Shelley Vohr 2021-09-23 23:35:12 +02:00 committed by GitHub
parent da921e680f
commit 919fd0f28d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,10 @@ const NSAutoresizingMaskOptions kDefaultAutoResizingMask =
return NO; return NO;
} }
- (BOOL)acceptsFirstMouse:(NSEvent*)event {
return YES;
}
- (BOOL)shouldIgnoreMouseEvent { - (BOOL)shouldIgnoreMouseEvent {
NSEventType type = [[NSApp currentEvent] type]; NSEventType type = [[NSApp currentEvent] type];
return type != NSEventTypeLeftMouseDragged && return type != NSEventTypeLeftMouseDragged &&