Skip to content

Commit 191a6c4

Browse files
committed
fix: make hidden tab unclickable
AdminForth/1797/implement-jsonformplugin-using
1 parent 5242cea commit 191a6c4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

custom/JsonForm.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,13 @@ onBeforeUnmount(() => {
190190
tallest one and switching tabs never reflows the form height. Inactive panes
191191
are hidden with opacity (not display:none) so they still occupy the cell.
192192
opacity — not visibility — because opacity groups the whole subtree: a nested
193-
active pane inside a hidden parent can override visibility:hidden but cannot
194-
override opacity:0. pointer-events keeps hidden panes non-interactive. */
195-
.af-json-form .jedi-tab-pane { grid-area: 1 / 1; opacity: 0; pointer-events: none; }
196-
.af-json-form .jedi-tab-pane.af-active { opacity: 1; pointer-events: auto; }
193+
active pane inside a hidden parent cannot override opacity:0.
194+
pointer-events is disabled on inactive panes and left UNSET on active ones so
195+
they inherit it: a nested active pane inside an inactive parent inherits
196+
pointer-events:none instead of forcing itself back to auto. */
197+
.af-json-form .jedi-tab-pane { grid-area: 1 / 1; opacity: 0; }
198+
.af-json-form .jedi-tab-pane:not(.af-active) { pointer-events: none; }
199+
.af-json-form .jedi-tab-pane.af-active { opacity: 1; }
197200
198201
/* ---------- labels & descriptions ---------- */
199202
.af-json-form label,

0 commit comments

Comments
 (0)