JS Code preventing edit/delete editor openning

JS Code preventing edit/delete editor openning

equinox22equinox22 Posts: 17Questions: 5Answers: 0

Hi all,

I'm implementing Datatables with Editor on my pages and have come across a bit of a show stopper.
The template I'm using comes with a file called app.js and contains the following bit of code:

            window.notyf = new ha({
                duration: 5e3,
                position: {
                    x: "right",
                    y: "top"
                },
                types: [{
                    type: "default",
                    backgroundColor: "#3B7DDD",
                    icon: {
                        className: "notyf__icon--success",
                        tagName: "i"
                    }
                }, {
                    type: "success",
                    backgroundColor: "#28a745",
                    icon: {
                        className: "notyf__icon--success",
                        tagName: "i"
                    }
                }, {
                    type: "warning",
                    backgroundColor: "#ffc107",
                    icon: {
                        className: "notyf__icon--error",
                        tagName: "i"
                    }
                }, {
                    type: "danger",
                    backgroundColor: "#dc3545",
                    icon: {
                        className: "notyf__icon--error",
                        tagName: "i"
                    }
                }]
            });

When this is in place, the edit and delete buttons (I don't use create on the table) don't perform any function. There's nothing in the debug or console that indicates a problem.

When I remove this code, the edit and delete buttons start to work, but the drop downs on my side navigation to get around my site stop working.

Is there anything in the above code that would interfere with Editor?

Thanks

Replies

  • allanallan Posts: 63,497Questions: 1Answers: 10,470 Site admin

    Hi,

    Without knowing what ha does, it is impossible to say I'm afraid. Can you give me a link to your page showing the issue so I can take a look at it?

    My guess is that whatever that is, is putting an overlay on top of the page which is capturing all clicks.

    Allan

  • equinox22equinox22 Posts: 17Questions: 5Answers: 0

    Hi,

    Thanks for replying.

    I've had another look and that's exactly what it's doing and is linked to class="wrapper" that sits within <body>. It also stops other down down menu items from functioning with the exception of the likes of the column visibility button.

    There's other ways of achieving the drop down functionality so will go with that.

    Cheers!

  • allanallan Posts: 63,497Questions: 1Answers: 10,470 Site admin

    Awesome - thanks for letting me know that helped.

    Allan

Sign In or Register to comment.