[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28907: 26.0.90; [eww] some problems in input/textarea
From: |
Katsumi Yamaoka |
Subject: |
bug#28907: 26.0.90; [eww] some problems in input/textarea |
Date: |
Fri, 10 Nov 2017 16:57:23 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (i686-pc-cygwin) |
On Thu, 02 Nov 2017 16:39:53 +0900, Katsumi Yamaoka wrote:
> On Mon, 30 Oct 2017 08:30:39 +0900, Katsumi Yamaoka wrote:
>> On Fri, 27 Oct 2017 16:31:49 +0300, Eli Zaretskii wrote:
>>>> Date: Fri, 20 Oct 2017 17:39:29 +0900
>>>> From: Katsumi Yamaoka <yamaoka@jpl.org>
>>>> There are some problems with an input form and a textarea as
>>>> follows:
>>>> ・Can't enter text at the beginnig of input/textarea if there is
>>>> a link just above the form.
>>>> ・Can't enter space at (1- eol).
>>>> ・Can't kill a line.
>>>> ・Can't undo.
>>>> ・Can't retrieve the response for the submit in a certain site.
>>>> ・Padding width gets incorrect if there is a wide character.
>>>> ・A major mode command like `g' doesn't work at the right outside
>>>> of textarea.
[...]
Some generic editing commands, except for `undo', now almost work
in input/textarea. To try writing something in those fields, you
can use the following two pages:
<https://html.com/tags/input/#Code_Example>
<https://html.com/tags/textarea/#Code_Example>
A patch is below.
* lisp/net/eww.el (eww-preprocess-text-input): New function that
calculates changed length based on string width, not characters.
(eww-render): Add it to before-change-functions.
(eww-tag-a): Make keymap text property non-sticky.
(eww-text-map, eww-textarea-map): Remap some generic editing keys.
(eww-beginning-of-text, eww-end-of-text): Work on textarea as well.
(eww-field-extract-text, eww-field-uniline-text, eww-field-insert-text)
(eww-field-funcall): New functions.
(eww-field-backward-delete-char-untabify)
(eww-field-delete-backward-char, eww-field-delete-char)
(eww-field-kill-line, eww-field-kill-region, eww-field-newline)
(eww-field-open-line, eww-field-yank, eww-field-yank-pop): New commands.
(eww-form-text): Pass field width to eww-form property.
(eww-field-replace-length): New internal variable.
(eww-process-text-input): Use string width based changed length;
enable a user to enter space at (1- eol);
don't break the form when killing a line at the beginning of the form.
(eww-tag-textarea): Treat textarea's text as its value if it is null;
work the padding correctly when there is a wide character;
make keymap prop non-sticky;
pass field width and height to eww-form property.
(eww-size-text-inputs): Make the field end position a marker.
txtSJbXZCY6ET.txt
Description: Text Data