[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XForms] cursor position in the input field

From: Michal Szymanski
Subject: [XForms] cursor position in the input field
Date: Sun, 10 Jul 2016 08:08:38 +0200
User-agent: Mutt/1.5.20 (2009-12-10)


At some point in the 1.2.x series, the behaviour of input objects has
changed. As stated in the manual, the cursor in the input field should
be by default (unless changed by fl_set_input_mode()) placed at the
end of the string upon showing the form.

It seems, however, that this is true only for the first time the form
is shown. If it is then hidden and shown again, the cursor is set at
the beginning of the string set by "fl_set_input".

It was not like that in older versions. The cursor was always placed
at the end of the "default" string. Now, in 1.2.4 and 1.2.5pre1, I can
even notice that, when "closing" the window with the input field
(hiding the form), the cursor moves to the beginning of the field just
before the form disappears.

Surely one can fix that by adding fl_set_input_cursorpos() but still,
I think this behaviour is sort of a bug.

I tried to debug, placing fl_get_input_cursorpos() in the code showing
the form, first after the input is set (but before the form is shown)
and second, after the form is shown. With single-char string, it shows
the xpos/ypos values:

Initial showing of the form:
1 1
1 1
Second and all next showings:
-1 -3149608
0 1

but, looking into input.c source, I could not find where it might happen.
I only checked that putting the fl_set_input() after the
fl_show_form() does not change anything.

regards, Michal.

  Michal Szymanski (msz at astrouw dot edu dot pl)
  Warsaw University Observatory, Warszawa, POLAND

reply via email to

[Prev in Thread] Current Thread [Next in Thread]