diff options
| author | Lars Magne Ingebrigtsen | 2014-11-27 17:42:28 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2014-11-27 17:42:28 +0100 |
| commit | 604ce9124efd295b46e3fbb2d6880302fe55a33f (patch) | |
| tree | 5e5ac8343920cc4e8a0b1c69f6c3140a577c3e47 | |
| parent | 5519c34ef8b5f06fa20e8de7dc54b5bd6fc88421 (diff) | |
| download | emacs-604ce9124efd295b46e3fbb2d6880302fe55a33f.tar.gz emacs-604ce9124efd295b46e3fbb2d6880302fe55a33f.zip | |
(eww-process-text-input): Fix deletion at the start of the field, too.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/net/eww.el | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 26c68df7395..6f22474d199 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | deleting at the last character (bug#19085). | 6 | deleting at the last character (bug#19085). |
| 7 | (eww-restore-history): Inhibit change functions while restoring | 7 | (eww-restore-history): Inhibit change functions while restoring |
| 8 | the history. | 8 | the history. |
| 9 | (eww-process-text-input): Fix deletion at the start of the field, too. | ||
| 9 | 10 | ||
| 10 | * dom.el (dom-pp): New function. | 11 | * dom.el (dom-pp): New function. |
| 11 | 12 | ||
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 75af7fbf64d..63a6c0d7af0 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -674,7 +674,6 @@ the like." | |||
| 674 | (setq-local tool-bar-map eww-tool-bar-map)) | 674 | (setq-local tool-bar-map eww-tool-bar-map)) |
| 675 | ;; desktop support | 675 | ;; desktop support |
| 676 | (setq-local desktop-save-buffer 'eww-desktop-misc-data) | 676 | (setq-local desktop-save-buffer 'eww-desktop-misc-data) |
| 677 | (buffer-disable-undo) | ||
| 678 | (setq buffer-read-only t)) | 677 | (setq buffer-read-only t)) |
| 679 | 678 | ||
| 680 | ;;;###autoload | 679 | ;;;###autoload |
| @@ -954,9 +953,14 @@ appears in a <link> or <a> tag." | |||
| 954 | See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") | 953 | See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") |
| 955 | 954 | ||
| 956 | (defun eww-process-text-input (beg end length) | 955 | (defun eww-process-text-input (beg end length) |
| 957 | (let* ((form (get-text-property (min (1- end) (point-max)) 'eww-form)) | 956 | (let* ((pos (cond |
| 957 | ((get-text-property (1- end) 'eww-form) | ||
| 958 | (1- end)) | ||
| 959 | ((get-text-property (1+ end) 'eww-form) | ||
| 960 | (1+ end)))) | ||
| 961 | (form (get-text-property pos 'eww-form)) | ||
| 962 | (properties (text-properties-at pos)) | ||
| 958 | (inhibit-read-only t) | 963 | (inhibit-read-only t) |
| 959 | (properties (text-properties-at (1- end))) | ||
| 960 | (type (plist-get form :type))) | 964 | (type (plist-get form :type))) |
| 961 | (when (and form | 965 | (when (and form |
| 962 | (member type eww-text-input-types)) | 966 | (member type eww-text-input-types)) |