0

I have an app with a source list. In Lion, it works wonderfully. In Mountain Lion, it works fine, but there's an unwanted side effect. Whenever the selected row changes in the source list, Mountain Lion will scroll that row to the top of the scroll view. This happens whether the change happens due to a click or via code. As I said, it doesn't happen in Lion, only Mountain Lion.

Has anyone experienced anything like this themselves?

Jay Wardell
  • 2,230
  • 1
  • 14
  • 13
  • 1
    I haven't seen that with my table views on ML. A method that has the scroll-to-top effect is `scrollRowToVisible:`; try searching your code for any calls to this. – Kevin Grant Aug 02 '12 at 03:25
  • That might be it, Kevin. In Lion, scrollRowToVisible: seems to scroll the row into the visible rect, but in ML, it seems to scroll the row to the top of the visible rect. What would you suggest as a replacement? – Jay Wardell Aug 04 '12 at 02:14
  • I'm not sure; the scrolling options for table views seem to be pretty limited. There are APIs that would let you figure out where a row is located, but not to scroll to such a row. A bit of a hack would be to search the ancestors of a table view to find an `NSScrollView`, and then obtain the vertical `NSScroller` and set its value (I've never tried it but in theory it would let you affect the view position). – Kevin Grant Aug 04 '12 at 02:29

0 Answers0