From 5d07eb7316b47e3fce4333ac5aada0e1d6d55e79 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sat, 15 Jun 2013 13:23:01 +0100 Subject: [PATCH] Fixed: paste in Firefox. The paste into input field hack requires that we don't stop the Cmd-V/Ctrl-V keydown propagation. --- AppKit/Platform/DOM/CPPlatformWindow+DOM.j | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index 2fc2c9ed0..1f306ceb8 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -825,6 +825,7 @@ var resizeTimer = nil; _DOMPasteboardElement.select(); _DOMPasteboardElement.value = ""; + StopDOMEventPropagation = NO; isNativePasteEvent = YES; } } @@ -889,16 +890,10 @@ var resizeTimer = nil; // If we are using the paste into field hack, we need to check it in a moment. if (!supportsNativeCopyAndPaste) - { - // Only stop the event if we're using the paste hack. Otherwise we'll handle it with - // our onpaste handler. - StopDOMEventPropagation = YES; window.setNativeTimeout(function () { [self _checkPasteboardElement]; }, 0); - } - else - { - StopDOMEventPropagation = NO; - } + + // We need the event to propagate or nothing will be pasted. + StopDOMEventPropagation = NO; } break; @@ -957,6 +952,8 @@ var resizeTimer = nil; CPDOMEventStop(aDOMEvent, self); [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode]; + + return !StopDOMEventPropagation } - (CPEvent)_fakeClipboardEvent:(DOMEvent)aDOMEvent type:(CPString)aType