[#7660] added missing type:button attribute and replaced form tag with div to minimize future regressions

This commit is contained in:
Gani Georgiev
2026-04-24 15:42:47 +03:00
parent 69cdda4bf3
commit fbeb09c40b
10 changed files with 18 additions and 16 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -13,9 +13,9 @@
<!-- prism -->
<script src="./libs/prism/prism.js" data-manual></script>
<script type="module" crossorigin src="./assets/index-Cd_LELY_.js"></script>
<script type="module" crossorigin src="./assets/index-D8D-K7hW.js"></script>
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
<link rel="stylesheet" crossorigin href="./assets/index-2kemIEr6.css">
<link rel="stylesheet" crossorigin href="./assets/index-CGid8tZ1.css">
</head>
<body>
</body>
+2
View File
@@ -59,6 +59,7 @@ export function appHeader() {
colorSchemeButton(),
t.button(
{
type: "button",
className: "header-link logged-user txt-normal",
"html-popovertarget": "logged-user-dropdown",
},
@@ -108,6 +109,7 @@ function colorSchemeButton() {
return [
t.button(
{
type: "button",
className: "header-link color-scheme-picker",
"html-popovertarget": "color-scheme-dropdown",
title: "Color scheme",
+1
View File
@@ -247,6 +247,7 @@ function initSearch(selectFunc = null) {
if (data.searchTerm.length) {
return t.button(
{
type: "button",
className: "link-hint",
title: "Clear search",
onclick: () => reset(),
+1
View File
@@ -133,6 +133,7 @@ function addToast(textOrElem, options = {}) {
textOrElem,
t.button(
{
type: "button",
className: "m-l-auto btn circle sm transparent secondary toast-remove",
title: "Clear",
onclick: () => removeToast(toastRef),
+2 -1
View File
@@ -139,7 +139,7 @@
[data-color-scheme="dark"],
[data-color-scheme="dark"] .dropdown {
--surfaceColor: #1f1f1f;
--surfaceAlt1Color: color-mix(in srgb, var(--surfaceColor), white 3%);
--surfaceAlt1Color: color-mix(in srgb, var(--surfaceColor), white 2%);
--surfaceAlt2Color: color-mix(in srgb, var(--surfaceColor), white 7%);
--surfaceAlt3Color: color-mix(in srgb, var(--surfaceColor), white 12%);
--surfaceAlt4Color: color-mix(in srgb, var(--surfaceColor), white 14%);
@@ -193,6 +193,7 @@
scrollbar-color: var(--surfaceAlt5Color) transparent;
--modalOverlayColor: rgb(0,0,0, 0.45);
--tooltipSurfaceColor: rgb(22,22,22, 0.9);
--boxShadow: 0px 8px 5px -5px rgba(0,0,0, 0.3);
--leftBoxShadow: -1px 0px 5px 0 rgba(0,0,0, 0.3);
+1
View File
@@ -152,6 +152,7 @@ export function input(props) {
{ className: "actions" },
t.button(
{
type: "button",
className: "btn sm secondary transparent circle",
ariaLabel: app.attrs.tooltip("Remove"),
onclick: () => remove(record.id),
+4 -8
View File
@@ -199,13 +199,13 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
data.initialDraft = getDraft();
draftWatcher?.unwatch();
draftWatcher = watch(() => data.recordHash, (newVal, oldVal) => {
if (typeof oldVal == "undefined") {
draftWatcher = watch(() => data.recordHash, (newHash, oldHash) => {
if (typeof oldHash == "undefined") {
return;
}
if (data.hasChanges) {
saveDraft(data.recordHash);
saveDraft(newHash);
} else {
deleteDraft();
}
@@ -395,15 +395,11 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
return [
t.div(
{ className: "modal-content" },
t.form(
t.div(
{
id: uniqueId + "form",
className: "grid",
inert: () => data.isLoading || data.isSaving,
onsubmit: (e) => {
e.preventDefault();
// save(); // don't allow to prevent accidental save on input enter
},
onmount: (el) => {
el._quickSaveHandler = (e) => {
if ((e.ctrlKey || e.metaKey) && e.code == "KeyS") {