Merge branch 'master' into mb-tree-sitter-parsers

This commit is contained in:
Max Brunsfeld
2018-01-03 15:20:10 -08:00
8 changed files with 203 additions and 432 deletions

View File

@@ -1013,8 +1013,10 @@ class AtomEnvironment {
}
addProjectFolder () {
this.pickFolder((selectedPaths = []) => {
this.addToProject(selectedPaths)
return new Promise((resolve) => {
this.pickFolder((selectedPaths) => {
this.addToProject(selectedPaths || []).then(resolve)
})
})
}

View File

@@ -9,8 +9,12 @@ class PaneResizeHandleElement extends HTMLElement
@addEventListener 'mousedown', @resizeStarted.bind(this)
attachedCallback: ->
@isHorizontal = @parentElement.classList.contains("horizontal")
@classList.add if @isHorizontal then 'horizontal' else 'vertical'
# For some reason Chromium 58 is firing the attached callback after the
# element has been detached, so we ignore the callback when a parent element
# can't be found.
if @parentElement
@isHorizontal = @parentElement.classList.contains("horizontal")
@classList.add if @isHorizontal then 'horizontal' else 'vertical'
detachedCallback: ->
@resizeStopped()

View File

@@ -1716,10 +1716,6 @@ class TextEditorComponent {
return
}
if (this.getChromeVersion() === 56) {
this.getHiddenInput().value = ''
}
this.compositionCheckpoint = this.props.model.createCheckpoint()
if (this.accentedCharacterMenuIsOpen) {
this.props.model.selectLeft()
@@ -1727,16 +1723,7 @@ class TextEditorComponent {
}
didCompositionUpdate (event) {
if (this.getChromeVersion() === 56) {
process.nextTick(() => {
if (this.compositionCheckpoint != null) {
const previewText = this.getHiddenInput().value
this.props.model.insertText(previewText, {select: true})
}
})
} else {
this.props.model.insertText(event.data, {select: true})
}
this.props.model.insertText(event.data, {select: true})
}
didCompositionEnd (event) {
@@ -3023,7 +3010,7 @@ class DummyScrollbarComponent {
const outerStyle = {
position: 'absolute',
contain: 'strict',
contain: 'content',
zIndex: 1,
willChange: 'transform'
}