* net/eww.el (eww): Record the new URL immediately, so that if the
HTTP fetch fails, we have the right URL in the buffer.
+ (eww-process-text-input): Don't shorten the input field if
+ deleting at the last character (bug#19085).
* dom.el (dom-pp): New function.
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))
+ (let* ((form (get-text-property (min (1- end) (point-max)) 'eww-form))
(inhibit-read-only t)
- (properties (text-properties-at end))
+ (properties (text-properties-at (1- end)))
(type (plist-get form :type)))
(when (and form
(member type eww-text-input-types))
((> length 0)
;; Add padding.
(save-excursion
+ (goto-char (1- end))
(goto-char
(if (equal type "textarea")
(1- (line-end-position))
- (eww-end-of-field)))
+ (1+ (eww-end-of-field))))
(let ((start (point)))
(insert (make-string length ? ))
(set-text-properties start (point) properties)))))