diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j index 5e681695a..e5663c7f8 100644 --- a/AppKit/CPApplication.j +++ b/AppKit/CPApplication.j @@ -617,6 +617,14 @@ CPRunContinuesResponse = -1002; [[theWindow platformWindow] _propagateCurrentDOMEvent:willPropagate]; #endif + if ([anEvent type] == CPMouseMoved) + { + if (theWindow !== _lastMouseMoveWindow) + [_lastMouseMoveWindow _mouseExitedResizeRect]; + + _lastMouseMoveWindow = theWindow; + } + if (_eventListeners.length) { var listener = _eventListeners[_eventListeners.length - 1]; @@ -637,14 +645,6 @@ CPRunContinuesResponse = -1002; return; } - if ([anEvent type] == CPMouseMoved) - { - if (theWindow !== _lastMouseMoveWindow) - [_lastMouseMoveWindow _mouseExitedResizeRect]; - - _lastMouseMoveWindow = theWindow; - } - if (theWindow) [theWindow sendEvent:anEvent]; } diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 129de8eab..8d162bac3 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -1576,6 +1576,7 @@ var CPViewFlags = { }, - (void)rightMouseDown:(CPEvent)anEvent { var menu = [self menuForEvent:anEvent]; + if (menu) [CPMenu popUpContextMenu:menu withEvent:anEvent forView:self]; else if ([[self nextResponder] isKindOfClass:CPView]) diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index ea9f832e5..0e1b250ad 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -133,15 +133,12 @@ // List of all open native windows var PlatformWindows = [CPSet set]; -// Define up here so compressor knows about em. +// Define up here so compressor knows about them. var CPDOMEventGetClickCount, CPDOMEventStop, StopDOMEventPropagation, StopContextMenuDOMEventPropagation; -//right now we hard code q, w, r and t as keys to propogate -//these aren't normal keycodes, they are with modifier key codes -//might be mac only, we should investigate futher later. var KeyCodesToPrevent = {}, CharacterKeysToPrevent = {}, KeyCodesToAllow = {}, @@ -1267,6 +1264,7 @@ var resizeTimer = nil; [_CPToolTip invalidateCurrentToolTipIfNeeded]; var button = aDOMEvent.button; + _mouseDownIsRightClick = button == 2 || (CPBrowserIsOperatingSystem(CPMacOperatingSystem) && button == 0 && modifierFlags & CPControlKeyMask); if (sourceElement.tagName === "INPUT" && sourceElement != _DOMFocusElement) @@ -1653,7 +1651,7 @@ var resizeTimer = nil; + (void)preventCharacterKeysFromPropagating:(CPArray)characters { for (var i = characters.length; i > 0; i--) - CharacterKeysToPrevent[""+characters[i-1].toLowerCase()] = YES; + CharacterKeysToPrevent["" + characters[i - 1].toLowerCase()] = YES; } /*!