mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Merge pull request #3210 from daboe01/cpwebview-resize-fix
Fixed: incorrect CPWebView sizing after animation
This commit is contained in:
+5
-1
@@ -278,7 +278,11 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
|
||||
if (_effectiveScrollMode === CPWebViewScrollAppKit)
|
||||
{
|
||||
var visibleRect = [_frameView visibleRect];
|
||||
// Use `[_scrollView documentVisibleRect]` instead of `[_frameView visibleRect]`.
|
||||
// `visibleRect` accounts for window clipping, which collapses to 0x0 if the view is
|
||||
// animated off-screen, resulting in an incorrectly shrunken web layout.
|
||||
var visibleRect = [_scrollView documentVisibleRect];
|
||||
|
||||
[_frameView setFrameSize:CGSizeMake(CGRectGetMaxX(visibleRect), CGRectGetMaxY(visibleRect))];
|
||||
|
||||
// try to get the document size so we can correctly set the frame
|
||||
|
||||
Reference in New Issue
Block a user