Fix default value in selects in eww

* lisp/net/eww.el (eww-change-select): Make hitting RET with an
empty string use a default (bug#43218).
This commit is contained in:
Lars Ingebrigtsen 2020-09-05 15:50:40 +02:00
parent b9bdc48b4c
commit 3c69864a9c

View file

@ -1451,7 +1451,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
(plist-get (cdr elem) :value))))
input)))
(display
(completing-read "Change value: " options nil 'require-match))
(completing-read "Change value: " options nil 'require-match
nil nil (car (rassoc (plist-get input :value)
options))))
(inhibit-read-only t))
(plist-put input :value (cdr (assoc-string display options t)))
(goto-char