[#7660] added missing type:button attribute and replaced form tag with div to minimize future regressions
This commit is contained in:
1
ui/dist/assets/index-2kemIEr6.css
vendored
1
ui/dist/assets/index-2kemIEr6.css
vendored
File diff suppressed because one or more lines are too long
1
ui/dist/assets/index-CGid8tZ1.css
vendored
Normal file
1
ui/dist/assets/index-CGid8tZ1.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
ui/dist/index.html
vendored
4
ui/dist/index.html
vendored
@@ -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>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user