-
-
Notifications
You must be signed in to change notification settings - Fork 472
Closed
Description
Describe the issue
I've noticed a few odd behaviors using CodeMirror 6 on Android (with Chrome)
For this issue, the title says it pretty well. If I have an identifier "Column," and I begin prepending to it the identifier "EdgeInsets," so that the editor content is "EdgeInsets^Column" (where ^ is the cursor), then hitting '.' will result in the contents "EdgeInsets.Edgeinsets.ColumnColumn"
Here's a video of the issue:
https://photos.app.goo.gl/X7HoRtTW6Yfx63Eu8
It doesn't seem to happen with 100% regularity, but I can repro it with these exact steps:
- Load on android: https://storage.googleapis.com/scroll_animate_videos/editor.html
- Tap to put the cursor just before
MaterialApp - Type 'A.'
Versions
"@codemirror/language": "^6.2.1",
"@codemirror/legacy-modes": "^6.1.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"codemirror": "^6.0.1",
"rollup": "^2.78.0"
Config
const updateListener = EditorView.updateListener.of((viewUpdate) => {
if (viewUpdate.docChanged &&
viewUpdate.transactions.some((t) => !t._skipListener)) {
// Document changed and at least one transaction isn't marked to skip
// this listener.
const newValue = viewUpdate.state.doc.toString();
if (window.codeEdited && window.codeEdited.postMessage) {
window.codeEdited.postMessage(newValue);
} else {
console.warn('codeEdited.postMessage is not defined.');
}
}
});
const editor = new EditorView({
doc: window.initCode,
extensions: [
basicSetup,
StreamLanguage.define(dart),
updateListener,
],
parent: document.body,
});Browser and platform
chrome on android
Reproduction link
https://storage.googleapis.com/scroll_animate_videos/editor.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels