diff options
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/net/eww.el | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42fd827c38d..0f6f824471d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | (eww-history-browse, eww-history-quit, eww-history-kill) | 4 | (eww-history-browse, eww-history-quit, eww-history-kill) |
| 5 | (eww-history-mode-map, eww-history-mode): New command and | 5 | (eww-history-mode-map, eww-history-mode): New command and |
| 6 | functions to list browser histories. | 6 | functions to list browser histories. |
| 7 | (eww-form-text): Support text form with disabled | ||
| 8 | and readonly attributes. | ||
| 7 | 9 | ||
| 8 | 2013-12-21 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> | 10 | 2013-12-21 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> |
| 9 | 11 | ||
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 8bcfb4838b6..36a91f8f10b 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -680,18 +680,22 @@ appears in a <link> or <a> tag." | |||
| 680 | (value (or (cdr (assq :value cont)) "")) | 680 | (value (or (cdr (assq :value cont)) "")) |
| 681 | (width (string-to-number | 681 | (width (string-to-number |
| 682 | (or (cdr (assq :size cont)) | 682 | (or (cdr (assq :size cont)) |
| 683 | "40")))) | 683 | "40"))) |
| 684 | (readonly-property (if (or (cdr (assq :disabled cont)) | ||
| 685 | (cdr (assq :readonly cont))) | ||
| 686 | 'read-only | ||
| 687 | 'inhibit-read-only))) | ||
| 684 | (insert value) | 688 | (insert value) |
| 685 | (when (< (length value) width) | 689 | (when (< (length value) width) |
| 686 | (insert (make-string (- width (length value)) ? ))) | 690 | (insert (make-string (- width (length value)) ? ))) |
| 687 | (put-text-property start (point) 'face 'eww-form-text) | 691 | (put-text-property start (point) 'face 'eww-form-text) |
| 688 | (put-text-property start (point) 'local-map eww-text-map) | 692 | (put-text-property start (point) 'local-map eww-text-map) |
| 689 | (put-text-property start (point) 'inhibit-read-only t) | 693 | (put-text-property start (point) readonly-property t) |
| 690 | (put-text-property start (point) 'eww-form | 694 | (put-text-property start (point) 'eww-form |
| 691 | (list :eww-form eww-form | 695 | (list :eww-form eww-form |
| 692 | :value value | 696 | :value value |
| 693 | :type type | 697 | :type type |
| 694 | :name (cdr (assq :name cont)))) | 698 | :name (cdr (assq :name cont)))) |
| 695 | (insert " "))) | 699 | (insert " "))) |
| 696 | 700 | ||
| 697 | (defconst eww-text-input-types '("text" "password" "textarea" | 701 | (defconst eww-text-input-types '("text" "password" "textarea" |