unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>, 16142@debbugs.gnu.org
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	[thread overview]
Message-ID: <87wqit1aje.fsf@dhcp-193-97.nrt.redhat.com> (raw)
In-Reply-To: <87mwjqzp0e.fsf@building.gnus.org>

> 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.






  reply	other threads:[~2013-12-25 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14 12:15 bug#16142: 24.3.50; [PATCH] eww: Delete keymap to eww-submit with Enter in the text field Kenjiro NAKAYAMA
2013-12-21 20:44 ` Ted Zlatanov
2013-12-24  7:28 ` Lars Ingebrigtsen
2013-12-25 10:37   ` Kenjiro NAKAYAMA [this message]
2013-12-25 15:33     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqit1aje.fsf@dhcp-193-97.nrt.redhat.com \
    --to=nakayamakenjiro@gmail.com \
    --cc=16142@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).