mervick / emojionearea

Emoji Picker Plugin for jQuery
https://jsfiddle.net/mervick/1v03Lqnu/765/
MIT License
953 stars 257 forks source link

The application breaks when the last character is deleted #449

Open bxlt1k opened 2 years ago

bxlt1k commented 2 years ago

There are emojioneArea with the following parameters

emojioneArea({
    pickerPosition: "bottom",
    filtersPosition: "bottom",
    tonesStyle: "square",
    autocomplete: false,
    attributes: {
        spellcheck: true,
        autocomplete: "on"
    }
});

In all browsers with the Google Chrome engine, there is such an error, if you delete the last character from textarea, the application freezes, but if you remove attributes, there is no such error. There are two scenarios of operation, when the setup opens and textarea initialization occurs immediately, this scenario works correctly and the second, when initialization occurs in the settings when adding a block with textarea, an error appears, the error may be related to initialization?

carpii commented 2 years ago

Can you reproduce it in jsfiddle?

https://jsfiddle.net/by5tvgej/

bxlt1k commented 2 years ago

@carpii I found a problem, along with the initialization of textarea, I initialize select2(), but I can't figure out what the reason is(

bxlt1k commented 2 years ago

@carpii @mervick https://jsfiddle.net/rudbp8qw/3/ If you remove all the symbols, the application breaks, however, if you remove the attributes everything works. In Google Chrome it breaks, in Firefox it works correctly