Merge pull request #2373 from Dogild/menu-context

New: default menu system is now disable for every right click except for the CPTextField
This commit is contained in:
Alexandre Wilhelm committed 2015-08-20 19:47:20 -07:00
commit c61d992559
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -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]))
+1 -1
View File
@@ -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