Test both Chrome 56 and other Chrome versions IME behavior

This commit is contained in:
Antonio Scandurra
2017-08-12 10:11:14 +02:00
parent ca183dd693
commit b4f029e9f0
2 changed files with 419 additions and 187 deletions

View File

@@ -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 {