mirror of
https://github.com/atom/atom.git
synced 2026-02-17 01:51:54 -05:00
Test both Chrome 56 and other Chrome versions IME behavior
This commit is contained in:
@@ -1644,7 +1644,7 @@ class TextEditorComponent {
|
||||
// 4. compositionend fired
|
||||
// 5. textInput fired; event.data == the completion string
|
||||
didCompositionStart () {
|
||||
if (parseInt(process.versions.chrome) === 56) {
|
||||
if (this.getChromeVersion() === 56) {
|
||||
this.getHiddenInput().value = ''
|
||||
}
|
||||
|
||||
@@ -1655,7 +1655,7 @@ class TextEditorComponent {
|
||||
}
|
||||
|
||||
didCompositionUpdate (event) {
|
||||
if (parseInt(process.versions.chrome) === 56) {
|
||||
if (this.getChromeVersion() === 56) {
|
||||
process.nextTick(() => {
|
||||
if (this.compositionCheckpoint) {
|
||||
const previewText = this.getHiddenInput().value
|
||||
@@ -2828,6 +2828,10 @@ class TextEditorComponent {
|
||||
getPlatform () {
|
||||
return this.props.platform || process.platform
|
||||
}
|
||||
|
||||
getChromeVersion () {
|
||||
return this.props.chromeVersion || parseInt(process.versions.chrome)
|
||||
}
|
||||
}
|
||||
|
||||
class DummyScrollbarComponent {
|
||||
|
||||
Reference in New Issue
Block a user