cappuccino / cappuccino

Web Application Framework in JavaScript and Objective-J
https://cappuccino.dev/
GNU Lesser General Public License v2.1
2.2k stars 333 forks source link

CPWebView loadHTMLString sets scrollMode to AppKit #263

Closed jfahrenkrug closed 14 years ago

jfahrenkrug commented 14 years ago

Using loadHTMLString to set the contents of the webView calls [self _setScrollMode:CPWebViewScrollAppKit]; I don't know why. And loadHTMLString should, imho, not touch the scrollMode.

boucher commented 14 years ago

This behavior is intended. Having an inconsistent scrollbar is never desired. It is merely tolerated when using a cross domain URL because it can't be fixed due to security restrictions.

jfahrenkrug commented 14 years ago

Thanks, Ross. But look at my use case: http://github.com/jfahrenkrug/MapKit-HelloWorld/blob/master/Frameworks/MapKit/MKMapView.j tlrobinson suggested I'd load google maps in a CPWebView so it's in a frame and draggable markers would work. This works fine, but of course I don't want Cappuccino Scrollbars around the map. I've added a category to my code (as you can see in the link) that lets me load a html string without setting the scrollbars to scrollappkit. So in my case there are cases where it would make sense to be able to load a html string without changing the scrollbar.

boucher commented 14 years ago

We should just document this behavior, and remove the _ from setScrollMode. If you don't want the default behavior, you can then just call setScrollMode: with the mode you want.

But it's definitely the case that we want the default to be CPWebViewScrollAppKit.