Open Bug 1860296 Opened 2 years ago Updated 1 year ago

Cursor jumps to wrong place when inserting text into text area

Categories

(Core :: DOM: Editor, defect)

Firefox 120
x86_64
Linux
defect

Tracking

()

Tracking Status
firefox-esr115 --- unaffected
firefox119 --- unaffected
firefox120 --- wontfix
firefox121 --- wontfix

People

(Reporter: u736855, Unassigned)

Details

(Keywords: regression, regressionwindow-wanted, steps-wanted)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0

Steps to reproduce:

When I add a new comment in a forum and insert external text blocks in the middle of the text,

Actual results:

the cursor continues to jump to the wrong place

Expected results:

the text should be inserted at the cursor position

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

My System:
Kernel: 5.10.188-antix.1-amd64-smp x86_64 bits: 64 compiler: gcc v: 10.2.1
parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.188-antix.1-amd64-smp root=UUID=<filter> ro
quiet splash fsck.mode=auto fsck.repair=preen security=apparmor apparmor=1
Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7
dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower September 26 2023
base: Debian GNU/Linux 11 (bullseye)

Component: Widget: Gtk → Untriaged
Product: Core → Firefox
Component: Untriaged → Firefox View
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

I am attempting to reproduce your reported issue, but I need some more information:

  1. Which forum reproduces this issue? Is it more of them? Tell us which ones.
  2. By "inserting external text box" do you mean to copy some random text from another application and paste it into the forum comment text box?
  3. The cursor that "jumps" is the intermittent vertical line that shows text focus, right?
  4. Can you make a detailed list of steps to reproduce?
Flags: needinfo?(mail)

My example from linuxmintusers.de
...
[code]about:processes[/code]
...
[code][about:support/code]

First I setting the opening and closing code tag via forum button,
The cursor will then automatically be in the middle
and then I want to insert my code there.
But when pasting, the text to be pasted often jumps 1 character to the right.
So I have to correct [

This time the text was copied from another browser tab,
sometimes from another program - the same effect

Flags: needinfo?(mail)

Before version from october 24, this error was always when inserting. Since today with 120.0a1-Build-ID20231022214411, this error sometimes disappeared or the text jumps many character to the right.

Flags: needinfo?(mail)
Flags: needinfo?(mail)

I see, Thanks. Can you use mozregression tool to find broken commit?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Use_Mozregression_tool
Thanks.

Flags: needinfo?(mail)

I don't use pip
But when I start Firefox120.0b6 via terminal, I get this message:

bookkeeper@mx-dell:~
$ /opt/firefox/firefox
[GFX1-]: glxtest: eglCreateContext returned an errorVENDOR

Flags: needinfo?(mail)

bookkeeper@mx-dell:~
$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 915G
OpenGL version string: 1.4 Mesa 20.3.5
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.3.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
bookkeeper@mx-dell:~
$

The severity field is not set for this bug.
:sfoster, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(sfoster)

But when I start Firefox120.0b8 via terminal, I get this message:

bookkeeper@mx-dell:~
$ /opt/firefox/firefox &
[1] 8306
bookkeeper@mx-dell:~
$ [GFX1-]: glxtest: eglCreateContext returned an errorVENDOR
[Parent 8306, Main Thread] WARNING: Failed to call GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Mutter.IdleMonitor was not provided by any .service files
: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:187

** (firefox-beta:8306): WARNING **: 01:22:39.565: Failed to call GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Mutter.IdleMonitor was not provided by any .service files

This doesnt seem to be related to Firefox View. I'm moving it to DOM::Editor.

Component: Firefox View → DOM: Editor
Flags: needinfo?(sfoster)
Product: Firefox → Core
Severity: -- → S2

Merge day for 120 beta was October 23, so I'm assuming that 120.0a1-Build-ID20231022214411 is just the first build for 120 beta.

The various errors you are seeing in the console are probably not related to the issue you have reported. It looks like we still need some more detailed steps to reproduce the problem. I tried going to linuxmintusers.de but I get an error message saying it is forbidden.

Keywords: steps-wanted

Hi theBookkeeper,

I've been trying to reproduce on https://forum.mxlinux.org:

  • Open the "reply to post" page
  • Insert a [code] block using the UI. The cursor is inside of the code block: [code]|[/code]
  • Paste something from somewhere else, potentially several times:
[code]about:processes[/code]
...
[code]about:support[/code]

Unfortunately, this does not repro. I tried MacOS and Ubuntu, each time using current Nightly. Did I miss some steps?
Could I ask you to try the current version of Firefox Nightly to see if the issue persists?

Flags: needinfo?(mail)

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to Jan Jaeschke [:jjaschke] from comment #17)

Could I ask you to try the current version of Firefox Nightly to see if the issue persists?

bookkeeper@mx-dell:~
$ /opt/firefox/firefox &
[1] 7639
bookkeeper@mx-dell:~
$ [GFX1-]: glxtest: eglCreateContext returned an errorVENDOR
[Parent 7639, Main Thread] WARNING: Failed to call GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Mutter.IdleMonitor was not provided by any .service files
: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:187

** (firefox-nightly:7639): WARNING **: 18:10:58.375: Failed to call GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Mutter.IdleMonitor was not provided by any .service files

Is the same bug with Firefox-Nightly , tested on https://forum.mxlinux.org

Flags: needinfo?(mail)

(In reply to theBookkeeper from comment #12)

[Parent 8306, Main Thread] WARNING: Failed to call GetIdletime(): GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Mutter.IdleMonitor was not provided by any .service files

This seems to be due to Xfce per comment 2. Although that particular error line is unlikely to be relevant to this bug, it's likely that Xfce is relevant and why repro on Ubuntu in comment 17 failed.

I think I've seen similar issues. Is it possible that this is a race condition between Javascript inserting the tags and pasting? Do we have ways to slow things down artificially to try and trigger it?

As team triage, we still like to see if we can get a reliable STRs and a regression window first.

Severity: S2 → --
Flags: needinfo?(masayuki)

I installed MX-21.3 to reproduce this bug. However, I cannot reproduce this within the new topic form of http://forum.mxlinux.org/ (as like comment 17) neither Firefox (pre-installed one) nor Firefox Nightly (shipped by Mozilla).

Selection could be adjusted by the IME handler (on Linux, if the active keyboard layout has some dead keys, they may be IME), but the code path runs only when the IME requests deleting surrounding text of selection (caret). So, the feature should not be used by keyboard like simple IME (IIRC, the feature was designed for some South-Asia languages to replace a composing grapheme cluster) for Western language users.

I have no more idea about that. (I could not get the stack of Selection API calls with MOZ_LOG=SelectionAPI:5,sync to check whether the selection is changed asynchronously, but the stack is not human readable, only with addresses in libxul.so in both release and nightly builds.)

Flags: needinfo?(masayuki)

And I don't see the reported errors/warnings in the terminal when I run Firefox from the Terminal in my VM.

The severity field is not set for this bug.
:peterv, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(peterv)

(In reply to Henri Sivonen (:hsivonen) from comment #20)

This seems to be due to Xfce per comment 2.

Could it be because of xfce4-clipman?

bookkeeper@mx-dell:~
$ apt policy xfce4-clipman
xfce4-clipman:
Installiert: 2:1.6.2-1mx21+1
Installationskandidat: 2:1.6.2-1
mx21+1
Versionstabelle:
*** 2:1.6.2-1mx21+1 500
500 https://mirror.yandex.ru/mirrors/MX-Linux/MX-Packages/mx/repo bullseye/main amd64 Packages
100 /var/lib/dpkg/status
2:1.6.1-1 500
500 http://deb.debian.org/debian bullseye/main amd64 Packages
bookkeeper@mx-dell:

$

I had a Update with FF122 and libqt5webkit5:
bookkeeper@mx-dell:~
$ apt list --installed webkit
Auflistung… Fertig
gir1.2-webkit2-4.0/oldstable-security,now 2.42.4-1deb11u1 amd64 [installiert]
libqt5webkit5/oldstable,now 5.212.0
alpha4-11 amd64 [installiert]
libwebkit2gtk-4.0-37/oldstable-security,now 2.42.4-1deb11u1 amd64 [installiert]
python3-pyqt5.qtwebkit/oldstable,now 5.15.2+dfsg-3 amd64 [installiert]
bookkeeper@mx-dell:

$

and now the bug seems to have disappeared in Firefox122.0b2 today:
bookkeeper@mx-dell:~
$ /opt/firefox/firefox &
[1] 9062
bookkeeper@mx-dell:~
$ ...

But why is code crossed out here?

We haven't had success to get a reliable STR.

Severity: -- → S3
Flags: needinfo?(peterv)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: