mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03: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:
parent
9c066d93fa
commit
ce9b34c9eb
@ -45,6 +45,11 @@ EditorScrollViewComponent = React.createClass
|
|||||||
@getDOMNode().addEventListener 'overflowchanged', @onOverflowChanged
|
@getDOMNode().addEventListener 'overflowchanged', @onOverflowChanged
|
||||||
window.addEventListener('resize', @onWindowResize)
|
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()
|
@measureHeightAndWidth()
|
||||||
|
|
||||||
componentDidUnmount: ->
|
componentDidUnmount: ->
|
||||||
|
Loading…
Reference in New Issue
Block a user