]> git.joonet.de Git - adminer.git/commitdiff
Firefox: Fix opening a database to the new browser's tab with Ctrl+click
authorPeter Knut <peter@pematon.com>
Sat, 5 Oct 2024 22:42:33 +0000 (00:42 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 19 Feb 2025 10:16:40 +0000 (11:16 +0100)
adminer/static/editing.js

index 4395bba6a83e80796fb35b4fef1b83ffcfec9bce..990079048eeca512369e77b28e02b449e6ef16cd 100644 (file)
@@ -103,6 +103,13 @@ var dbPrevious = {};
 * @this HTMLSelectElement
 */
 function dbMouseDown(event) {
+       // Firefox: mouse-down event does not contain pressed key information for OPTION.
+       // Chrome: mouse-down event has inherited key information from SELECT.
+       // So we ignore the event for OPTION to work Ctrl+click correctly everywhere.
+       if (event.target.tagName == "OPTION") {
+               return;
+       }
+
        dbCtrl = isCtrl(event);
        if (dbPrevious[this.name] == undefined) {
                dbPrevious[this.name] = this.value;