mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 22:21:29 +00:00
Fixed: undefined location of key events.
Without this fix all regular key events such as `CPKeyDown` would have an undefined location. Since the location can't be retrieved from the browser on key events, this fix now makes it so that the last seen mouse position is included with each key event.
This commit is contained in:
@@ -218,7 +218,6 @@ var resizeTimer = nil;
|
||||
_windowLevels = [];
|
||||
_windowLayers = [CPDictionary dictionary];
|
||||
|
||||
|
||||
[self registerDOMWindow];
|
||||
[self updateFromNativeContentRect];
|
||||
|
||||
@@ -677,6 +676,7 @@ var resizeTimer = nil;
|
||||
- (void)keyEvent:(DOMEvent)aDOMEvent
|
||||
{
|
||||
var event,
|
||||
location = _lastMouseEventLocation || _CGPointMakeZero(),
|
||||
timestamp = [CPEvent currentTimestamp],
|
||||
sourceElement = aDOMEvent.target || aDOMEvent.srcElement,
|
||||
windowNumber = [[CPApp keyWindow] windowNumber],
|
||||
|
||||
Reference in New Issue
Block a user