Page MenuHomePhabricator

2017 wikitext editor gets very confused while typing signature with Finnish keyboard layout (combining diacritics and non-breaking spaces?)
Closed, ResolvedPublic

Description

Since the signature button is hidden too well :) I have the habit of typing –~~~~ manually.

In the Finnish keyboard typing tildes is difficult, because there is one button (let's call it #) which has (¨, ^, ~ and ¯) and they are all "dead" keys, so they only appear once you type a new character like a. The tilde is third on the list, which means that I have to press AltGr+# followed by space four times. As you might guess by now, sometimes I don't lift my thumb from AltGr fast enough so the system sees AltGr+space and produces a non-breaking space with combining tilde.

I am not sure if there are other things going on here, such as "AltGr down, # down, Space down, # up, Space up, AltGr up" that confuses the system, but I wasn't able to see any patterns.

So what seems to be happening is that oftentimes a new line is inserted while cursor position doesn't move. If you zoom into the screenshot you will see the cursor in about the middle of the page.

image.png (1×1 px, 536 KB)

Here are errors from the console:

This one keeps repeating while I "mistype":

Uncaught Error: Invalid retain length, cannot retain backwards:-1
    at VeDmTransactionBuilder.ve.dm.TransactionBuilder.pushRetain (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:522)
    at VeDmTransactionBuilder.ve.dm.TransactionBuilder.pushInsertion (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:527)
    at Object.ve.dm.TransactionBuilder.static.newFromReplacement (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:509)
    at VeCeTextState.ve.ce.TextState.getChangeTransaction (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:751)
    at VeCeMwWikitextSurface.ve.ce.Surface.handleObservedChanges (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:852)
    at VeCeSurfaceObserver.ve.ce.SurfaceObserver.pollOnceInternal (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:875)
    at VeCeSurfaceObserver.ve.ce.SurfaceObserver.pollOnce (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:875)
    at VeCeMwWikitextSurface.ve.ce.Surface.afterDocumentKeyDown (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:829)
    at VeEventSequencer.ve.EventSequencer.callListener (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:423)
    at VeEventSequencer.ve.EventSequencer.afterEvent (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:421)
13:01:58.016 load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:880

This only appeared once:

Uncaught TypeError: Cannot read property 'classList' of null
    at VeCeLinearSelection.ve.ce.LinearSelection.getNodeClientRectFromRange (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:880)
    at VeCeLinearSelection.ve.ce.LinearSelection.getSelectionRects (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:878)
    at VeCeLinearSelection.ve.ce.LinearSelection.getSelectionStartAndEndRects (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:879)
    at VeUiMWWikitextSurface.ve.ui.Surface.scrollCursorIntoView (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:958)
    at VeDmMwWikitextSurface.oo.EventEmitter.emit (<anonymous>:169:445)
    at VeDmMwWikitextSurface.ve.dm.Surface.changeInternal (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:570)
    at VeDmMwWikitextSurface.ve.dm.Surface.change (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:569)
    at VeCeMwWikitextSurface.ve.ce.Surface.changeModel (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:869)
    at VeCeMwWikitextSurface.ve.ce.Surface.handleObservedChanges (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:852)
    at VeCeSurfaceObserver.ve.ce.SurfaceObserver.pollOnceInternal (load.php?debug=false&lang=fi&modules=ext.CodeMirror.lib%2CvisualEditor|ext.CodeMirror.mode.mediawiki|ext.CodeMirror.visualEditor.init|ext.graph.visualEditor|ext.templateData.images|ext.templateDataGenerator.ui.images|ext.visualEditor.articleTarget%2Ccore%2CdesktopArticleTarget%2CmoduleIcons%2Cmwcore|mediawiki.widgets|mediawiki.widgets.DateInputWidget%2CStashedFileWidget|oojs-ui-core%2Coojs-ui-widgets|oojs-ui.styles.icons-accessibility%2Cicons-editing-advanced%2Cicons-editing-core%2Cicons-editing-list%2Cicons-editing-styling%2Cicons-layout%2Cicons-location%2Cicons-media%2Cicons-wikimedia&skin=vector&version=05pa78d:875)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I can't reproduce this with Linux, but for some reason I don't get an NBSP with AltGr+Space, so this seems an important factor.
By the way, the most efficient way to type 4 tildes with a Finnish keyboard with dead keys seems to me to be: Hold AltGr, Press the key with the tilde 8 times, release AltGr.

This is with Chrome on KDE (on Debian) with default Finnish keyboard.

Thanks for the tip.

I can't test myself, but this is likely to be fixed with the fix for T85093. @Nikerabbit Can you still reproduce the problem?

matmarex renamed this task from 2017 wikitext editor gets very confused while typing signature (combining diacritics and non-breaking spaces?) to 2017 wikitext editor gets very confused while typing signature with Finnish keyboard layout (combining diacritics and non-breaking spaces?).Aug 30 2018, 11:01 PM

In production www.mediawiki.org yes:

image.png (189×666 px, 8 KB)

Is the fix deployed to somewhere yet?

Nikerabbit claimed this task.

Tested on test.wikipedia.org now, is fixed.