[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16142: 24.3.50; [PATCH] eww: Delete keymap to eww-submit with Enter
From: |
Kenjiro NAKAYAMA |
Subject: |
bug#16142: 24.3.50; [PATCH] eww: Delete keymap to eww-submit with Enter in the text field. |
Date: |
Wed, 25 Dec 2013 19:37:25 +0900 |
User-agent: |
mu4e 0.9.9.6pre2; emacs 24.3.50.2 |
> It's how all other web browsers work, and is necessary for using the web
> at all. It's common now to eschew submit buttons. So rejected.
You are right, it was my mistake. But it is the problem that users can't
distiguish input text from textarea, like following HTML.
<form method="POST" action="./dummy.php">
<input type="text" name="example1" size="10">
<p>
<textarea name="example1" rows="1"></textarea>
</form>
I think eww should change the color to distinguish. I send new patch,
please reconsider and review it.
Signed-off-by: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
* net/eww.el(eww-form-textarea): New defface for textarea.
(eww-tag-textarea): Apply textarea color.
---
lisp/net/eww.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 02c93a0..576778c 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -115,6 +115,14 @@ See also `eww-form-checkbox-selected-symbol'."
:version "24.4"
:group 'eww)
+(defface eww-form-textarea
+ '((t (:background "#C0C0C0"
+ :foreground "black"
+ :box (:line-width 1))))
+ "Face for eww text inputs."
+ :version "24.4"
+ :group 'eww)
+
(defvar eww-current-url nil)
(defvar eww-current-dom nil)
(defvar eww-current-source nil)
@@ -776,7 +784,7 @@ See URL
`https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
(when (> pad 0)
(insert (make-string pad ? ))))
(add-face-text-property (line-beginning-position)
- (point) 'eww-form-text)
+ (point) 'eww-form-textarea)
(put-text-property (line-beginning-position) (point)
'local-map eww-textarea-map)
(forward-line 1))
--
1.8.3.1
Regards,
Kenjiro
larsi@gnus.org writes:
> Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com> writes:
>
>> The key map to eww-submit with Enter key in the text field should be
>> deleted. It is easy to mistake.
>
> It's how all other web browsers work, and is necessary for using the web
> at all. It's common now to eschew submit buttons. So rejected.