mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
fixed: scrolling events were missed on slower maschines in chrome 52
This commit is contained in:
@@ -952,8 +952,8 @@ _CPPlatformWindowWillCloseNotification = @"_CPPlatformWindowWillCloseNotificatio
|
||||
timestamp:timestamp windowNumber:windowNumber context:nil eventNumber:-1 clickCount:1 pressure:0];
|
||||
event._DOMEvent = aDOMEvent;
|
||||
|
||||
// We lag 1 event behind without this timeout.
|
||||
setTimeout(function()
|
||||
// We lag 1 event behind without this approach
|
||||
window.requestAnimationFrame(function()
|
||||
{
|
||||
if (aDOMEvent.deltaMode !== undefined && aDOMEvent.deltaMode !== 0)
|
||||
{
|
||||
@@ -992,10 +992,10 @@ _CPPlatformWindowWillCloseNotification = @"_CPPlatformWindowWillCloseNotificatio
|
||||
_DOMScrollingElement.scrollLeft = 150;
|
||||
_DOMScrollingElement.scrollTop = 150;
|
||||
|
||||
// Is this needed?
|
||||
//[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
// this is needed to prevent flickering during scrolling
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// We hide the dom element after a little bit
|
||||
// so that other DOM elements such as inputs
|
||||
|
||||
Reference in New Issue
Block a user