fix edit button

This commit is contained in:
zadam 2023-01-02 22:32:05 +01:00
parent 115bf0af4d
commit 291ef87c9b
2 changed files with 4 additions and 6 deletions

View File

@ -1,8 +1,8 @@
import NoteContextAwareWidget from "../note_context_aware_widget.js";
const TPL = `<span class="button-widget bx"
const TPL = `<button class="button-widget bx"
data-toggle="tooltip"
title=""></span>`;
title=""></button>`;
export default class AbstractButtonWidget extends NoteContextAwareWidget {
isEnabled() {

View File

@ -39,12 +39,10 @@ export default class EditButton extends OnClickButtonWidget {
// make the edit button stand out on the first display, otherwise
// it's difficult to notice that the note is readonly
if (this.isVisible() && !wasVisible) {
this.$iconSpan.addClass("bx-tada");
this.$widget.css("transform", "scale(2)");
this.$widget.addClass("bx-tada bx-lg");
setTimeout(() => {
this.$iconSpan.removeClass("bx-tada bx-lg");
this.$widget.css("transform", "scale(1)");
this.$widget.removeClass("bx-tada bx-lg");
}, 1700);
}
}