Skip navigation

iOS like "rubber band" scrolling in Lion - Safari

20480 Views 132 Replies Latest reply: Mar 6, 2014 9:09 AM by Alex Zavatone RSS
  • Alex Zavatone Level 1 Level 1 (0 points)

    WR, I have been able to do a build of TextEdit that has the bouncy bits disabled.  It's at home on one of my other Macs. 

     

    This is a first step.

     

    I want to see if we can replace the app's plist in the (stupidly) protected Library folder with a variable that defaults to NO for bounces.

     

    Also, I wonder if we could modify the scrollView header defailt value that hides in the system somewhere to set that to NO, but I'm not sure.

     

    One BIG PROBLEM we have is that with many Lion codesigned apps, you can't modify one byte of the file or it will crash on launch.  Totally blows.  This is not the Apple we knew and loved.

     

    Idoitic features like

    "auto locking of files you haven't used in a while",

    "bouncy views and scrollbars",

    "sudden and automatic quitting of apps",

    "versioning of things I don't want versioned",

    "animated EVERYTHING".

    "inability to turn gestures on or off on a per app basis",

    "protected Library folder",

    "code signing preventing us from ending app contents",

     

    and not giving us control to turn these things off make Lion a terribly aggrivating experience and a NFW for me.

     

    Why in **** should we have to pay money for an OS that has all this stuff - THAT WE WANT TO TURN OFF - and then have no (or no easy) way to actually turn them off?  That is not an upgrade, that is a PITA.

     

    Our time = money.  And I want to keep the small amount of spare time that I have.

     

    Thanks Apple. For making the OS suck and for screwing over your long time users.

  • Király Level 6 Level 6 (9,470 points)

    Hi Alex,

     

    So you were able to disable the scroll bounce in TextEdit? But you had to modify the app binary itself, and not just add a line to its .plist file... is that right?

     

    My hat is off to you for you knowledge and perseverance, sir!

  • Alex Zavatone Level 1 Level 1 (0 points)
    Currently Being Moderated
    Apr 16, 2012 4:25 PM (in response to Király)

    Ya, I rebuilt the app from the source code in Xcode.  What I want to do is find out how to put that "don't bounce" setting in a plist preference.

     

    You can't modify the binary.  If you try to, the code signing will force it to quit on launch. 

     

    Try it.  Duplilcate the TextEdit app and right click on it and click Show Package Contents", then modify one of the files in there.

     

    Close it and try to launch the app. BLAM.  Instant crash.

     

    Let me try to check the source to see if there is anything I can look at now.

  • Alex Zavatone Level 1 Level 1 (0 points)
    Currently Being Moderated
    Apr 28, 2012 12:41 PM (in response to Meherally)

    Because it *****.  And it is TERRIBLY annoying.  And distracting.  It serves no purpose. We never had this before and we can not turn it off.

  • Alex Zavatone Level 1 Level 1 (0 points)

    Here is my research from the day.

     

     

    On iOS, there is a thing called a UIScrollView.  Setting bounces to 0 makes the scrolling not bounce.

     

    Lion is different.  It uses an NSScrollView. (I just did the research)  In it is a property called "Elasticity" which determines this: Allow content to be scrolled past its bounds on this axis in an elastic fashion.  Things that scroll generally sit within an NSScrollView on the screen.  It turns out the NSScrollElasticity is responsable for that.  It's defined in NSScrollView.h.

     

     

        #if MAC_OS_X_VERSION_10_7 <= MAC_OS_X_VERSION_MAX_ALLOWED

        enum {

            NSScrollElasticityAutomatic = 0, // automatically determine whether to allow elasticity on this axis

            NSScrollElasticityNone      = 1, // disallow scrolling beyond document bounds on this axis

            NSScrollElasticityAllowed   = 2, // allow content to be scrolled past its bounds on this axis in an elastic fashion

        };

     

     

    If you open this folder, you can see the file on your hard drive.

     

    /System/Library/Frameworks/Appkit.framework/Versions/C/Headers/NSScrollView.h

     

    Dunno if modifying that file would help anything, but in any case, I would love for a preference file (pList) to automatically set all NSScrollViews for an app to use NSScrollView.NSScrollElasticity = NSScrollElasticityNone

     

    I think that would work, but I don't yet know how to do it and do it for all apps.

  • Király Level 6 Level 6 (9,470 points)

    Excellent work on this, Alex.

     

    I've tried quite a few combinations of things:

     

    defaults write com.apple.safari NSScrollElasticityNone -bool yes

    defaults write com.apple.safari NSScrollElasticityNone 1

    defaults write com.apple.safari NSScrollView.NSScrollElasticity NSScrollElasticityNone

    defaults write .GlobalPreferences NSScrollElasticityNone -bool yes

    defaults write .GlobalPreferences NSScrollElasticityNone 1

    defaults write .GlobalPreferences NSScrollView.NSScrollElasticity NSScrollElasticityNone


    ...and none have worked.

     

    I'm going to ask in another forum if anyone might know if and how it is possible to take your research to the next level.

  • baltwo Level 9 Level 9 (59,180 points)
    Currently Being Moderated
    Apr 29, 2012 1:17 PM (in response to Király)

    As a WAG, try, since it might be associated with the Mouse prefPane. I'm in SL currently, so can't check;

     

    defaults write com.apple.systempreferences NSScrollElasticityNone 1

    27" i7 iMac 10.6.8 , Mac OS X (10.7.3), G4 450 MP 1.5 GB RAM w/(10.5.8/10.4.11/9.2.2)
  • Fofer Level 1 Level 1 (115 points)

    Alex, just wanted to chime in and say, NICE WORK.  Your findings make me optimistic!  I, too, hate this unnecessary "elastic" effect (most notably in Safari) and am eager to see some software development to turn it the frack OFF.  Maybe a System Preference we can install (or terminal hack we can apply) to disable it on our MacOS forever.  Thank you!

  • Fofer Level 1 Level 1 (115 points)

    Hmm... I wonder, does this tip get us any closer to solving the puzzle?

     

    Remove scrolling elasticity in Xcode

  • Alex Zavatone Level 1 Level 1 (0 points)
    Currently Being Moderated
    May 8, 2012 9:25 AM (in response to Fofer)

    Oh, you wonderful person, you. 

     

    I think I was given source code to a project that will do this last week, but I haven't had the time to boot to Lion and compile it yet.

     

    This is the start of bringing sanity back to the Mac OS.  The fact that we had to wait so long, that third parties had to do it and that Apple thinks that scroll elasticity/bouncing on the Mac is a good idea means that someone making the decisions for the GUI for Apple is still sick in the head.

     

    Scroll elasticity on the Mac OS is the Clippy of the Mac world.

     

    I will distribute this to the Xcode lists. 

     

    You are now on my Christmas list and in my Will.

     

    If you want a copy of TextEdit without the bouncy, please let me know and I'll build you a copy.

     

    I have downloaded a copy of the WebKit source.  I with I had time to make a Safari plugin (or version of Safari) that fixed the window tab order and disabled elasticity and auto quitting.

     

    EDIT: OH, Fofer, this is the compiled version of the code that was sent to me a week or so ago.  Much thanks to Thomas Clement for this.

  • baltwo Level 9 Level 9 (59,180 points)

    This is WAG. I don't have the issue with a wired mouse.

     

    defaults write -g NSScrollElasticity 1

    27" i7 iMac 10.6.8 , Mac OS X (10.7.3), G4 450 MP 1.5 GB RAM w/(10.5.8/10.4.11/9.2.2)
  • Alex Zavatone Level 1 Level 1 (0 points)
    Currently Being Moderated
    May 9, 2012 5:17 AM (in response to baltwo)

    WAG?  I have no idea what that means.

     

    I like your defaults terminal statement. When I get a chance to reboot to Lion, I'll try it out. 

     

    How did you figure it out?  Are there docs on what you can set using the defaults statement?

  • Ronald P. Regensburg Calculating status...

    WAG = A wild-assed guess

     

    I suppose baltwo has to guess because the issue does not exist with his mouse.

  • baltwo Level 9 Level 9 (59,180 points)

    thumbsup.gifthumbsup.gifthumbsup.gif

    BTW (by the way), go here for any unknown acronyms.

    27" i7 iMac 10.6.8 , Mac OS X (10.7.3), G4 450 MP 1.5 GB RAM w/(10.5.8/10.4.11/9.2.2)
  • Alex Zavatone Level 1 Level 1 (0 points)
    Currently Being Moderated
    May 9, 2012 11:29 AM (in response to baltwo)

    I've been told by the guy who wrote the Xcode plugin that this will work, but I'm in the middle of debugging and can't reboot to Lion:

     

    defaults write -g NSScrollViewRubberbanding 1

     

    Anyone want to try it out?

1 ... 3 4 5 6 7 ... 9 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.