From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nicolas Graner Newsgroups: gmane.emacs.bugs Subject: bug#43218: EWW handles default answer incorrectly when changing a select Date: Sat, 05 Sep 2020 12:44:52 +0200 Message-ID: <86r1rgv6xn.fsf@hypra-xx> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34392"; mail-complaints-to="usenet@ciao.gmane.io" To: 43218@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 05 12:46:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEVhy-0008oj-7d for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 12:46:10 +0200 Original-Received: from localhost ([::1]:56952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEVhx-000375-1O for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 06:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEVhr-00036l-BX for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 06:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEVhr-00051F-1g for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 06:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEVhq-0002i4-KK for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 06:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Graner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43218 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159930270210319 (code B ref -1); Sat, 05 Sep 2020 10:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Sep 2020 10:45:02 +0000 Original-Received: from localhost ([127.0.0.1]:41588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEVgr-0002gF-L7 for submit@debbugs.gnu.org; Sat, 05 Sep 2020 06:45:01 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEVgq-0002fz-0M for submit@debbugs.gnu.org; Sat, 05 Sep 2020 06:45:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEVgp-0002rb-PS for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 06:44:59 -0400 Original-Received: from smtp26.services.sfr.fr ([93.17.128.197]:33453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEVgn-0004mM-22 for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 06:44:58 -0400 X-mail-filterd: 1.0.0 X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=universite-paris-saclay.fr; s=202006; t=1599302693; h=From:To:Subject:Date ; bh=Vq6pIIdirrYrNMaICa+xcMzqA5zS0InQ2b4UoVCsDVM=; b=JFQB1ueqvDmbqognxMVIGua C8Uq+d6+6rMqDYUahQnmKn1iHhzOLcYSFtPtw4FZMiiG8Gw3WCXVtIZbFjmMj+/sgrJP/qVUOOfP jSOSYsxtvj9WyLfe2Nr7Y84XScgtyedXPyeH8FgUwjCfrOiMspe/xDvTjR9pAvjCttHhLJgPG0PY Tl6x5zrQOKFoop0fFkkI4V1068XjGQu0K/aUBKxD9jLulCgpd4IYTBa9/7NloVbDUb2t0IJQ53sd uNnSXwDmOpQszq/h/IcrtJUlcJ4hJgkNPFknO+qsiF3pZZB7UIQMm6cCNtDTkuKdNA7JwN0LMndb Z6Ij4EytfwMHGLw==; Original-Received: from hypra-graner (106.124.67.86.rev.sfr.net [86.67.124.106]) by msfrf2613.sfr.fr (SMTP Server) with ESMTP id 8596E1C000439 for ; Sat, 5 Sep 2020 12:44:53 +0200 (CEST) Original-Received: from hypra-graner (106.124.67.86.rev.sfr.net [86.67.124.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2613.sfr.fr (SMTP Server) with ESMTPS for ; Sat, 5 Sep 2020 12:44:53 +0200 (CEST) Received-SPF: pass client-ip=93.17.128.197; envelope-from=nicolas.graner@sfr.fr; helo=smtp26.services.sfr.fr X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/05 06:30:08 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187201 Archived-At: When you type on a "select" input in EWW, you are prompted for a new value in the minibuffer. If you just type to the prompt, the selected value should remain unchanged. Instead, the value is replaced with an empty string, which effectively make the select disappear. Explanation: the function eww-change-select calls: (completing-read "Change value: " options nil 'require-match) without providing a default value, and uses its return value unconditionally. If the user just types , that return value is an empty string. To fix it, the code should either pass the currently selected value as the DEF argument to completing-read, or ignore the return value when it is empty. Nicolas