GNU bug report logs -
#15704
[PATCH 2/8] EWW: Handle HTML5 input types as text input.
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
HTML5 adds a bunch of new input types which can be treated as text.
* lisp/net/eww.el (eww-text-input-types): New const.
(eww-process-text-input): Treat input types in
`eww-text-input-types' as text.
Signed-off-by: Rüdiger Sonderfeld <ruediger <at> c-plusplus.de>
---
lisp/net/eww.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 989cd2e..ccc2399 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -631,12 +631,19 @@ (defun eww-form-text (cont)
:name (cdr (assq :name cont))))
(insert " ")))
+(defconst eww-text-input-types '("text" "password" "textarea"
+ "color" "date" "datetime" "datetime-local"
+ "email" "month" "number" "search" "tel"
+ "time" "url" "week")
+ "List of input types which represent a text input.
+See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
+
(defun eww-process-text-input (beg end length)
(let* ((form (get-text-property (min (1+ end) (point-max)) 'eww-form))
(properties (text-properties-at end))
(type (plist-get form :type)))
(when (and form
- (member type '("text" "password" "textarea")))
+ (member type eww-text-input-types))
(cond
((zerop length)
;; Delete some space at the end.
--
1.8.4.1
This bug report was last modified 11 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.