mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Make HTML button elements tab-stoppable in eww (bug#81107)
* lisp/net/eww.el (eww-form-submit): Call put-text-property to add help-echo and shr-tab-stop properties. (eww-tag-input): Exclude inputs with type="submit" when adding the help-echo and shr-tab-stop properties, since that's now done in eww-form-submit, called earlier for type="submit".
This commit is contained in:
parent
72d890c43e
commit
ec3d662de0
1 changed files with 6 additions and 2 deletions
|
|
@ -1771,7 +1771,10 @@ just re-display the HTML already fetched."
|
||||||
(put-text-property start (point) 'keymap eww-submit-map)
|
(put-text-property start (point) 'keymap eww-submit-map)
|
||||||
;; Pretend to touch-screen.el that this is a button.
|
;; Pretend to touch-screen.el that this is a button.
|
||||||
(put-text-property start (point) 'button t)
|
(put-text-property start (point) 'button t)
|
||||||
(insert " ")))
|
(insert " ")
|
||||||
|
(put-text-property start (1+ start) 'help-echo "Button")
|
||||||
|
;; Mark this as an element we can TAB to.
|
||||||
|
(put-text-property start (1+ start) 'shr-tab-stop t)))
|
||||||
|
|
||||||
(defun eww-form-checkbox (dom)
|
(defun eww-form-checkbox (dom)
|
||||||
(let ((start (point)))
|
(let ((start (point)))
|
||||||
|
|
@ -1991,7 +1994,8 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
|
||||||
:value (or (dom-attr dom 'value) "")))))))
|
:value (or (dom-attr dom 'value) "")))))))
|
||||||
(t
|
(t
|
||||||
(eww-form-text dom)))
|
(eww-form-text dom)))
|
||||||
(unless (= start (point))
|
(unless (or (= start (point))
|
||||||
|
(equal type "submit"))
|
||||||
(put-text-property start (1+ start) 'help-echo "Input field")
|
(put-text-property start (1+ start) 'help-echo "Input field")
|
||||||
;; Mark this as an element we can TAB to.
|
;; Mark this as an element we can TAB to.
|
||||||
(put-text-property start (1+ start) 'shr-tab-stop t))))
|
(put-text-property start (1+ start) 'shr-tab-stop t))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue