(eww-process-text-input): Fix deletion at the start of the field, too.

parent 5519c34e
......@@ -6,6 +6,7 @@
deleting at the last character (bug#19085).
(eww-restore-history): Inhibit change functions while restoring
the history.
(eww-process-text-input): Fix deletion at the start of the field, too.
* dom.el (dom-pp): New function.
......
......@@ -674,7 +674,6 @@ the like."
(setq-local tool-bar-map eww-tool-bar-map))
;; desktop support
(setq-local desktop-save-buffer 'eww-desktop-misc-data)
(buffer-disable-undo)
(setq buffer-read-only t))
;;;###autoload
......@@ -954,9 +953,14 @@ appears in a <link> or <a> tag."
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* ((pos (cond
((get-text-property (1- end) 'eww-form)
(1- end))
((get-text-property (1+ end) 'eww-form)
(1+ end))))
(form (get-text-property pos 'eww-form))
(properties (text-properties-at pos))
(inhibit-read-only t)
(properties (text-properties-at (1- end)))
(type (plist-get form :type)))
(when (and form
(member type eww-text-input-types))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment