diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index 92142fc26..00894190e 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -1050,6 +1050,14 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); } } +- (void)rightMouseDown:(CPEvent)anEvent +{ + if ([self menuForEvent:anEvent] || [[self nextResponder] isKindOfClass:CPView]) + [super rightMouseDown:anEvent]; + else + [[[anEvent window] platformWindow] _propagateContextMenuDOMEvent:YES]; +} + - (void)mouseDragged:(CPEvent)anEvent { if (![self isEnabled] || !([self isSelectable] || [self isEditable])) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index cd589a28b..d40d1ad6f 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -1831,7 +1831,7 @@ var CPViewHighDPIDrawingEnabled = YES; else if ([[self nextResponder] isKindOfClass:CPView]) [super rightMouseDown:anEvent]; else - [[[anEvent window] platformWindow] _propagateContextMenuDOMEvent:YES]; + [[[anEvent window] platformWindow] _propagateContextMenuDOMEvent:NO]; } - (CPMenu)menuForEvent:(CPEvent)anEvent