Skip to content

Commit 6decdc8

Browse files
committed
add invalid and valid styles to widget
1 parent 16abdc4 commit 6decdc8

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

js/src/bootstrap5/buttons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class Action {
8787
}
8888

8989
unload() {
90-
if (this.tooltip) {
90+
if (this.tooltip && this.tooltip._element) {
9191
this.tooltip.dispose();
9292
}
9393
this.elem.off();

scss/bootstrap5/widget.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,12 @@ div.tiptap-editor {
3232
margin-right: 6px;
3333
}
3434
}
35+
36+
&.is-valid .ProseMirror {
37+
border-color: var(--bs-form-valid-border-color);
38+
}
39+
40+
&.is-invalid .ProseMirror {
41+
border-color: var(--bs-form-invalid-border-color);
42+
}
3543
}

src/yafowil/widget/tiptap/resources/bootstrap5/widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var yafowil_tiptap = (function (exports, $, bootstrap) {
4848
e.preventDefault();
4949
}
5050
unload() {
51-
if (this.tooltip) {
51+
if (this.tooltip && this.tooltip._element) {
5252
this.tooltip.dispose();
5353
}
5454
this.elem.off();

src/yafowil/widget/tiptap/resources/bootstrap5/widget.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/yafowil/widget/tiptap/resources/bootstrap5/widget.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)