mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
use offset instead of position
This commit is contained in:
@@ -121,8 +121,8 @@ class PreviewList extends ScrollView
|
||||
@operations[@selectedOperationIndex]
|
||||
|
||||
scrollToElement: (element) ->
|
||||
top = @scrollTop() + element.position().top
|
||||
bottom = top + element.outerHeight()
|
||||
top = @scrollTop() + element.offset().top
|
||||
bottom = top - element.outerHeight()
|
||||
|
||||
if bottom > @scrollBottom()
|
||||
@scrollBottom(bottom)
|
||||
|
||||
Reference in New Issue
Block a user