mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Handle events with native handlers to avoid shadow DOM issues with React
This commit is contained in:
@@ -102,7 +102,7 @@ TextEditorComponent = React.createClass
|
||||
@useHardwareAcceleration, @performedInitialMeasurement, @backgroundColor, @gutterBackgroundColor
|
||||
}
|
||||
|
||||
div ref: 'scrollView', className: 'scroll-view', onMouseDown: @onMouseDown,
|
||||
div ref: 'scrollView', className: 'scroll-view',
|
||||
InputComponent
|
||||
ref: 'input'
|
||||
className: 'hidden-input'
|
||||
@@ -380,6 +380,7 @@ TextEditorComponent = React.createClass
|
||||
node.addEventListener 'mousewheel', @onMouseWheel
|
||||
node.addEventListener 'focus', @onFocus # For some reason, React's built in focus events seem to bubble
|
||||
node.addEventListener 'textInput', @onTextInput
|
||||
@refs.scrollView.getDOMNode().addEventListener 'mousedown', @onMouseDown
|
||||
|
||||
scrollViewNode = @refs.scrollView.getDOMNode()
|
||||
scrollViewNode.addEventListener 'scroll', @onScrollViewScroll
|
||||
|
||||
Reference in New Issue
Block a user