unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43217: EWW ignores select options in an optgroup
@ 2020-09-05 10:30 Nicolas Graner
  2020-09-05 13:43 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Graner @ 2020-09-05 10:30 UTC (permalink / raw)
  To: 43217

When rendering <select> tags, EWW ignores any <option> which is part
of an <optgroup>.

Example : put this into an HTML file and visit it in EWW:

--------------------------------------------------
<form method="post">
first select
<select name="a">
<option value="1">one</option>
<option value="2">two</option>
</select>
second select
<select name="b">
<optgroup label="foobar">
<option value="3">three</option>
<option value="4">four</option>
</optgroup>
</select>
</form>
--------------------------------------------------

It should normally display:

--------------------------------------------------
first select 

one

second select 

three
--------------------------------------------------

but instead displays:

--------------------------------------------------
first select 

one

second select 
--------------------------------------------------

Explanation: the function 'eww-tag-select' searches for 'option' in
(dom-non-text-children dom) which includes only first-level children
of the 'select' node, and therefore misses children of 'optgroup' children.

Note: this was tested in master. Earlier versions had the opposite bug
where options where processed *only* if they were within an optgroup.
It seems that this bug was fixed incorrectly.

Nicolas





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#43217: EWW ignores select options in an optgroup
  2020-09-05 10:30 bug#43217: EWW ignores select options in an optgroup Nicolas Graner
@ 2020-09-05 13:43 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-05 13:43 UTC (permalink / raw)
  To: Nicolas Graner; +Cc: 43217

Nicolas Graner <nicolas.graner@universite-paris-saclay.fr> writes:

> When rendering <select> tags, EWW ignores any <option> which is part
> of an <optgroup>.
>
> Example : put this into an HTML file and visit it in EWW:

[...]

Thanks for the clear test case.  I think I've now fixed this in Emacs 28
(by just gathering all <option> elements under a select, no matter
whether there's any intervening elements or not.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-05 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-05 10:30 bug#43217: EWW ignores select options in an optgroup Nicolas Graner
2020-09-05 13:43 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).