Handle iframe scrolling

This commit is contained in:
anthony 2020-12-05 22:15:00 +00:00
parent ba3fe1fffa
commit f22baae2c2
1 changed files with 8 additions and 0 deletions

View File

@ -420,6 +420,14 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt ) {
return location;
}
-(void)scrollWheel: (NSEvent*)theEvent {
NSPoint loc = [self convertMousePoint: theEvent];
int scroll = (int)[theEvent deltaY] * -25; //todo:- linescroll
if (!browser_window_scroll_at_point(browser, loc.x, loc.y, 0, scroll)) {
[[self nextResponder] scrollWheel: theEvent];
}
}
- (void) mouseDown: (NSEvent *)theEvent {
if ([theEvent modifierFlags] & NSControlKeyMask) {
[self popUpContextMenuForEvent: theEvent];