mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Subtract preview list offset from top
This commit is contained in:
@@ -123,9 +123,7 @@ class PreviewList extends ScrollView
|
||||
@operations[@selectedOperationIndex]
|
||||
|
||||
scrollToElement: (element) ->
|
||||
top = @scrollTop() +
|
||||
element.position().top +
|
||||
element.closest('li.path').position().top
|
||||
top = @scrollTop() + element.offset().top - @offset().top
|
||||
bottom = top + element.outerHeight()
|
||||
|
||||
@scrollBottom(bottom) if bottom > @scrollBottom()
|
||||
|
||||
Reference in New Issue
Block a user