Re: Scroll view within scroll view blocks scrolling
Re: Scroll view within scroll view blocks scrolling
- Subject: Re: Scroll view within scroll view blocks scrolling
- From: Conrad Shultz <email@hidden>
- Date: Thu, 28 Apr 2011 20:05:11 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 4/28/11 7:42 PM, Indragie Karunaratne wrote:
> Figured out a super easy solution for this. Override scrollWheel: in
> an NSScrollView subclass:
>
> - (void)scrollWheel:(NSEvent *)theEvent { [super
> scrollWheel:theEvent]; [[self nextResponder] scrollWheel:theEvent];
> }
>
> Works great :-)
Will this give the best behavior? Without testing, I assume that this
always hands scrolling off to the superview (in your case).
However, when I view a page in, say, Safari that has a scrollable
textarea, I observe that:
1) If I start scrolling with my cursor in the textarea it scrolls the
textarea.
2) If I start scrolling outside the textarea and scroll through it, the
page continues to scroll instead of triggering scroll of the textarea.
3) If I pause scrolling with my cursor in the textarea, there is a
couple second period during which resuming scrolling will still scroll
the page. After this "cooling off" period, scrolling is handled as in
case #1.
While such behavior might not be what you envision, it does seem to be
uniform across multiple browsers and therefore might be what a user
expects (if you choose to go this route).
- --
Conrad Shultz
Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFNuirnaOlrz5+0JdURAu3OAJ0datgca59zgNUGiC+lbkM/bcPMOQCfWPvN
nCbhxZ3QkTRyx5+z5SrXWcM=
=RkVE
-----END PGP SIGNATURE-----
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden