Closed Bug 178735 Opened 22 years ago Closed 21 years ago

cursor movement in textarea broken again

Categories

(Core :: Layout: Text and Fonts, defect)

Sun
Solaris
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 188288

People

(Reporter: ml, Assigned: prabhat.hegde)

References

Details

(Keywords: intl)

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2b) Gecko/20021024
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2b) Gecko/20021024

When editing some text in a textarea and moving the cursor (up down, left,
right) sometimes the cursor gets stuck (preferably at the end of a line) or jump
to an unexpected position (when moving around)

This behavior stays as long as the textarea.

Reproducible: Always

Steps to Reproduce:
1. copy some text into a textarea (I copied some text from below into the
"Actual Results" textarea)
2. move the cursor around: up, down, left, right, to the end of a line and into
the middle of it again
3. soon the cursor will jump from a position in the middle of a line to the
beginning of the next one (as if the line end was reached) or stick at the end
of a line when pressing "cursor left"


Actual Results:  
 Add any additional information you feel may be relevant to this bug, such as
the theme you were using (does the bug still occur with the default theme?), a
Talkback crash ID, or special information about your computer's configuration.
Any information longer than a few lines, such as a stack trace or HTML testcase,
should be added using the "Create a new Attachment" link on the bug, after it is
filed. 


I only have a solaris workstation with mozilla (1.2beta) here, but IIRC the same
bug is present on the Linux version. Don't know about other platforms.

Problems with cursor movement in textareas has a long track with mozilla, with
versions around 1.0 and 1.1 being quite stable. Hopefully this problem will be
gone again fast. 

thanks in advance
nothing to do with forms....
Assignee: form → mjudge
Component: Layout: Form Controls → Selection
QA Contact: tpreston → pmac
Confirmed with Solaris 1.2.1 build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
confirmed in solaris 1.3b (2003021104)
This happens for me only when a line of text is wrapped because it's too wide
for the text area.

I am using a nightly build, "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3b)
Gecko/20030215"  This is for Solaris 2.6.

My cursor is "stuck" or jumps when it is on the second and following lines.

e.g. if I have: 

"The quick brown duck jumped over the lazy gorilla" 

Then the cursor moves fine but if I make my compose window "thinner" so that the
text wraps like so:
     
"The quick brown duck
jumped over the lazy
gorilla"

then the cursor will not move left or will sometimes jump if is positioned
(using the mouse etc) anywhere from the "j" of jumped to the "a" of gorilla.
This problem seems to be gone in the 15 March nightly build for Solaris 2.6 -
Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4a) Gecko/20030315




*** Bug 182115 has been marked as a duplicate of this bug. ***
I can reproduce this with Mozilla 1.4 release on Solaris 8.
Also in Mozilla Mail composer window.
*** Bug 200294 has been marked as a duplicate of this bug. ***
I would say this is a blocker for 1.4.1. This bug must be fixed. It is causing
major problems for our deployment of Mozilla 1.4. We do not want to go back to
Mozilla 1.3.
blocking1.4.x == ?
Flags: blocking1.4.x?
Also happens for me, using the mozilla email composer window.

We are running the 1.4 Solaris 5.8 release (the one compiled by mozilla, not the
sub contributed one).

Any ideas what is causing it?
Searching arround bug 211679 sounds similar and has an interesting comment:-

------- Additional Comment #3 From Mick Kelleher  2003-07-04 09:02 -------

I can confirm that i have the same problem with my Forte 7 builds of Mozilla
1.3.1 and 1.4 when using gtk 1.2.10 (Forte compiled) and compiling with Forte 7.
The problem does'nt happen on gtk2 (gtk2.2.2 - Forte compiled) builds of Mozilla
1.3.1 or Mozilla 1.4 when using the GNOME 2 environment.
Looks like a general gtk 1.2.10 bug rather then a composer specific issue.

---------------------------------------------

So it might be related to the gtk version.

1.2.10 is the latest 1.2.x release, and it doesn't work for me using either the
Netscape 7 sourced Forte compiled version or my own gcc compiled one.

Does anyone have a Solaris 5.8 build using Forte and gtk 2.2.x???
Or does anyone know how to build a gcc solaris version - last time I tried I
think the result was 
very slow, but failed completely with any optimisation turned on....
*** Bug 208765 has been marked as a duplicate of this bug. ***
Can anyone please check whether the same problem occurs on Linux/x86 (assuming
the SAME Mozilla version and the SAME versiob of GTK+ is used on both platforms)
?
The problem does NOT occur using Linux, using
mozilla-i686-pc-linux-gnu-1.4-sea.tar.gz

The GTK+ libs appear to be the same version:-
        libmozjs.so => ./libmozjs.so (0x40013000)
        libplds4.so => ./libplds4.so (0x4008c000)
        libplc4.so => ./libplc4.so (0x4008f000)
        libnspr4.so => ./libnspr4.so (0x40094000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x400d7000)
        libdl.so.2 => /lib/libdl.so.2 (0x400eb000)
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x400ee000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x4026a000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x402a5000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x402a8000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x402d0000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x402d8000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x402e8000)
        libm.so.6 => /lib/i686/libm.so.6 (0x403b3000)
        libc.so.6 => /lib/i686/libc.so.6 (0x403d6000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

lrwxr-xr-x    1 root     root           19 Feb 26 14:02 /usr/lib/libgtk-1.2.so.0
-> libgtk-1.2.so.0.9.1*
lrwxr-xr-x    1 root     root           21 Feb 26 14:00
/usr/lib/libglib-1.2.so.0 -> libglib-1.2.so.0.0.10*
lrwxr-xr-x    1 root     root           19 Feb 26 14:02 /usr/lib/libgdk-1.2.so.0
-> libgdk-1.2.so.0.9.1*
lrwxr-xr-x    1 root     root           24 Feb 26 14:00
/usr/lib/libgmodule-1.2.so.0 -> libgmodule-1.2.so.0.0.10

Which matches my sun setup, which fails, but under linux it works.
Flags: blocking1.4.x? → blocking1.4.x-
Interesting test results - One linux build works, the other has the same bug as
the Solaris build!

To be precise
http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.5a/mozilla-i686-pc-linux-gnu-1.5a.tar.gz
is ok.

Whereas
http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.5a/mozilla-i686-pc-linux-gnu-ctl-svg-1.5a.tar.gz
fails.

Doing some checking, it appears that both build use identical sets of libraries
(except the actual mozilla libs of course). In particular the same
gtk/gdk/gmodule/glib and Xi/Xext/X11.

So it appears that is either a Mozilla bug, or something in some Mozilla builds
provokes a bug elsewhere.

Cheers
Mark

Flags: blocking1.4.x- → blocking1.4.x?
Appears to be a CTL bug....

Maybe somone should change the Component to "Complex Text Layout" and the OS to
All? I don't own this bug, so can't.

I have built 1.4 for linux twice, the only difference between the two builds is
the setting of --enable-ctl.

The CTL enabled build has the bug, and the non-CTL one doesn't!

about:buildconfig - GOOD
about:buildconfig

Build platform
target
i686-pc-linux-gnu

Build tools
Compiler        Version         Compiler flags
gcc     gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)   -Wall -W -Wno-unused
-Wpointer-arith -Wcast-align -pedantic -Wno-long-long -pthread -pipe
g++     gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)   -fno-rtti
-fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long
-fshort-wchar -pthread -pipe -I/usr/X11R6/include

Configure arguments
--verbose --prefix=/usr/local/mozilla --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --with-default-mozilla-five-home=/usr/local/mozilla
--with-pthreads --with-system-jpeg --with-system-zlib --with-system-png
--with-system-mng --enable-default-toolkit=gtk2 --enable-optimize
--enable-freetype2 --enable-crypto --disable-postscript --enable-tests
--enable-calendar --enable-extensions=all --enable-svg 

about:buildconfig - BAD:-

about:buildconfig

Build platform
target
i686-pc-linux-gnu

Build tools
Compiler        Version         Compiler flags
gcc     gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)   -Wall -W -Wno-unused
-Wpointer-arith -Wcast-align -pedantic -Wno-long-long -pthread -pipe
g++     gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)   -fno-rtti
-fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long
-fshort-wchar -pthread -pipe -I/usr/X11R6/include

Configure arguments
--verbose --prefix=/usr/local/mozilla --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --with-default-mozilla-five-home=/usr/local/mozilla
--with-pthreads --with-system-jpeg --with-system-zlib --with-system-png
--with-system-mng --enable-default-toolkit=gtk2 --enable-optimize
--enable-freetype2 --enable-crypto --disable-postscript --enable-tests
--enable-calendar --enable-ctl --enable-extensions=all --enable-svg 

I can confirm my faulty build also uses --enable-ctl.
Reassign to CTL team...
Assignee: mjudge → prabhat.hegde
Component: Selection → Complex Text Layout
QA Contact: pmac → art
Hi Roland, would it be possible for someone/you to make a 1.4 Solaris 8 non-CTL
official build available?

I only have gcc 3.3 here, and if I use that it is impossible to get Sun's java
plugin to work (even tried rebuilding their java, but it appears to be an old
release and still requires the Forte compiler, as well as gcc, to build for Sun.

I could try building with an old gcc, but I hear there is a fairly major speed
drop off, and of course I would have to find disk space for another compiler
build/installation.

Also I have all sorts of minor problems with mozilla under gcc - A GTK build
just crashes on startup, and the GTK2 one throws annoying warnings/beeps all the
time (but then I did turn debugging on!).
Flags: blocking1.4.x? → blocking1.4.x-
I can confirm this for Mozilla versions 1.4 and 1.5 under Sun/Solaris:

Cursor movement with cursor keys within wrapped lines does not work correctly.

Kind regards,

Nils.
I wonder if this would be fixed by the patch in Bug 122552. However, that patch
(from 2003-04-01) never got any further since it waited for a large rewrite in
Bug 203406, which in turn has waited for a review since 2003-07-10...
*** Bug 228169 has been marked as a duplicate of this bug. ***
Prabhat, you wrote (IIRC) to me that you have a patch to fix this problem. Can
you  upload it here? Now that at very long last, bug 203406 was resolved, (I'm
gonna land the patch in a moment) we have to fix this problem to enable CTL by
default on Unix. For the last year or so, I built with CTL enabled and I've been
suffering from this bug :-) 
Keywords: intl
Oops. Sorry, the patch for bug 203406 should fix this bug according to prabhat.
I'll test it and report the result. 
Depends on: 203406
Even after the landing of the patch for bug 203406, the cursor movement is still
strange around wrapped lines. Without this fixed, we can't turn on CTL in the
default build. 

An easy way to reproduce the problem is :

1. Type whatever you want in this textarea (80 column, wrap="hard") with
occasional spaces so that linewrapping/break works 
2. Once in the second line, type a few more words
3. At the end of the second line, try to move the cursor to the left. 
4. The cursor will jump up to the first line instead. 
5. Only in the first line, the cursor movement is normal. Everywhere else,
pressing the left and right cursor keys make the cursor position make a wild jump. 
There are a few seemingly identical bugs floating around. Don't we have to
'unify' them all? In addition to bug 122879, we also have bug 188288. 
Will bringover and try trunk build over the holidays and let you know. I suspect
the nsText*.cpp portion of the patch has been lost somewhere causing the breakage.
Indeed, none of attachment to bug 203406 includes a patch to nsText*.

bug 188288 has a patch (I updated an old patch to the current trunk). 
resolving this bug as dupe of bug 188288.


*** This bug has been marked as a duplicate of 188288 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
related bug:
Bug 176272 Highlighted text moves, inaccurate cursor position (broken on Mac OS X)
Component: Layout: CTL → Layout: Text
QA Contact: arthit → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.