Skip to content

Instantly share code, notes, and snippets.

@makotom
Created November 22, 2018 06:17
Show Gist options
  • Save makotom/7982abbd72761c6fbb81a9ee8a02e034 to your computer and use it in GitHub Desktop.
Save makotom/7982abbd72761c6fbb81a9ee8a02e034 to your computer and use it in GitHub Desktop.
Dropbox Paper breaks CJK inputs (possibly) due to this well-known nature.
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<title>Pre-Repro</title>
<script>
document.addEventListener('DOMContentLoaded', () => {
const userInput = document.querySelector('div#textInput');
const logView = document.querySelector('textArea#logView');
userInput.addEventListener('input', () => {
logView.value += JSON.stringify([Date.now(), document.querySelector('#textInput').innerText]);
logView.value += '\n';
});
});
</script>
<p>
<b>Text content is continuously updated even though user inputs are not copmlete (i.e. even while user is selecting preferred Kanji).</b><br>
Therefore, sync (to Dropbox) and resync (from Dropbox) may occur before completion of CJK text input, which breaks text input experience.
</p>
<div id="textInput" contenteditable="true">This area accepts text inputs. Try it here.</div>
<p>Evidence:</p>
<textarea id="logView" style="width: 80em; height: 50em;"></textarea>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment