* bug#16194: 24.3.50; [PATCH] eww: Support text form with disabled and readonly attributes.
@ 2013-12-20 0:31 Kenjiro NAKAYAMA
2013-12-21 20:42 ` Ted Zlatanov
0 siblings, 1 reply; 2+ messages in thread
From: Kenjiro NAKAYAMA @ 2013-12-20 0:31 UTC (permalink / raw
To: 16194
The "disabled" and "readonly" attibutes of text form should be readonly.
example.1
<input type="text" name="example" value="test" disabled>
example.2
<input type="text" name="example" value="test" readonly>
Signed-off-by: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
* net/eww.el (eww-form-text): Support text form with disabled
and readonly attributes.
---
lisp/net/eww.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index a4cec26..8fb6d2d 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -679,13 +679,17 @@ appears in a <link> or <a> tag."
(value (or (cdr (assq :value cont)) ""))
(width (string-to-number
(or (cdr (assq :size cont))
- "40"))))
+ "40")))
+ (readonly (or (cdr (assq :disabled cont))
+ (cdr (assq :readonly cont)))))
(insert value)
(when (< (length value) width)
(insert (make-string (- width (length value)) ? )))
(put-text-property start (point) 'face 'eww-form-text)
(put-text-property start (point) 'local-map eww-text-map)
- (put-text-property start (point) 'inhibit-read-only t)
+ (if readonly
+ (put-text-property start (point) 'read-only t)
+ (put-text-property start (point) 'inhibit-read-only t))
(put-text-property start (point) 'eww-form
(list :eww-form eww-form
:value value
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#16194: 24.3.50; [PATCH] eww: Support text form with disabled and readonly attributes.
2013-12-20 0:31 bug#16194: 24.3.50; [PATCH] eww: Support text form with disabled and readonly attributes Kenjiro NAKAYAMA
@ 2013-12-21 20:42 ` Ted Zlatanov
0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2013-12-21 20:42 UTC (permalink / raw
To: Kenjiro NAKAYAMA; +Cc: 16194-done
On Fri, 20 Dec 2013 09:31:27 +0900 Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com> wrote:
KN> The "disabled" and "readonly" attibutes of text form should be readonly.
KN> example.1
KN> <input type="text" name="example" value="test" disabled>
KN> example.2
KN> <input type="text" name="example" value="test" readonly>
Applied, thank you.
Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-21 20:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20 0:31 bug#16194: 24.3.50; [PATCH] eww: Support text form with disabled and readonly attributes Kenjiro NAKAYAMA
2013-12-21 20:42 ` Ted Zlatanov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.