mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Warn when scroll view gets accidentally scrolled and fix it
I want this code to go away once we track down the causes of any unwanted autoscrolling by the browser
This commit is contained in:
@@ -45,6 +45,11 @@ EditorScrollViewComponent = React.createClass
|
||||
@getDOMNode().addEventListener 'overflowchanged', @onOverflowChanged
|
||||
window.addEventListener('resize', @onWindowResize)
|
||||
|
||||
node.addEventListener 'scroll', ->
|
||||
console.warn "EditorScrollView scroll position changed, and it shouldn't have. If you can reproduce this, please report it."
|
||||
node.scrollTop = 0
|
||||
node.scrollLeft = 0
|
||||
|
||||
@measureHeightAndWidth()
|
||||
|
||||
componentDidUnmount: ->
|
||||
|
||||
Reference in New Issue
Block a user