unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graner <nicolas.graner@universite-paris-saclay.fr>
To: 43217@debbugs.gnu.org
Subject: bug#43217: EWW ignores select options in an optgroup
Date: Sat, 05 Sep 2020 12:30:07 +0200	[thread overview]
Message-ID: <86tuwcv7m8.fsf@hypra-xx> (raw)

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





             reply	other threads:[~2020-09-05 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05 10:30 Nicolas Graner [this message]
2020-09-05 13:43 ` bug#43217: EWW ignores select options in an optgroup Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86tuwcv7m8.fsf@hypra-xx \
    --to=nicolas.graner@universite-paris-saclay.fr \
    --cc=43217@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).