summernote: Violations come out in google chrome when using summernote

Before submitting an issue, please make sure to search for already open issues, and add to that. This way we can track issues more easily. Thank you, and Thanks for using Summernote.

Please answer the below questions, this will help us to more easily resolve whatever issues you are having, and direct issue to the suitable people to with your issue or to give you correct answers.

Description of your Issue or Request:

When started using summernote following violations come out:

[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

and

[Violation] Forced reflow while executing JavaScript took 103ms

steps to reproduce (Add more if necessary):

  1. Enable summernote using:
$(".summernote").summernote({
        height: "100px",
        placeholder: true,
        disableResizeEditor: true,
        callbacks: {
            onInit: configureEditorsOnInit,
            onImageUpload: configureEditorsOnImageUpload,
            onKeydown: configureEditorsOnKeydown
        }
    });
    $('.note-statusbar').hide();

function configureEditorsOnInit(event) {
    var placeHolderText = "";

    if ($(this).hasClass("reply-editor")) {
        placeHolderText = "Enter your reply here...";
    } else {
        placeHolderText = "Enter your comment or drag and drop mark-up file here...";

        event.editor.height(300);
        event.editingArea.find(".note-editable").height(200);
        event.editingArea.find(".note-editable").css('cursor', 'text');
    }

    this.placeholder.length == 0
        ? event.editingArea.find(".note-placeholder").html(placeHolderText)
        : event.editingArea.remove(".note-placeholder")
}

function configureEditorsOnKeydown(event) {
    if (event.ctrlKey && event.keyCode === 13) {
        event.preventDefault();

        var parentContainer = $(this).parent();
        if ($(this).hasClass("reply-editor")) {
            parentContainer.find(".post-reply").click();
        } else {
            parentContainer.find("#post-comment").click();
        }
    }
}

function configureEditorsOnImageUpload(files, editor, welEditable) {
    sendFile(files[0], $(this), variables.installationId());
}
  1. Run browser

What is your Operating System, Browser and Version and Summernote Version you are using:

This can help find and resolve any issues.

  1. Operating System: Windows 10

  2. Browser and Version: Google chrome 78.0.3904.108 (Official Build) (64-bit)

  3. Summernote Version (including which BS3, BS4, Lite or All): lite and regular one

screenshot of issue

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments