mervick / emojionearea

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

Focus error Firefox #76

Open guiz26 opened 7 years ago

guiz26 commented 7 years ago

Hi, I have problème with plugin in Firefox. I send message and i click in area for write new message the cursor focus .emojionearea-button

My code : $("#message").emojioneArea({ pickerPosition: "bottom", filtersPosition: "bottom", tonesStyle: "checkbox", events: { keydown: function (editor, event) { $('#message').empty(); $('#message').val($('.emojionearea-editor').html()); if (event.which == 13 && $('#check_equal_send').is(':checked')) { event.preventDefault(); $('#from_chat').submit(); return false; } }, }, });

$('#from_chat').submit(function () { //code for send $('#message').val(''); $('.emojionearea-editor').empty(); $('.emojionearea-editor').focus(); return false; });

Image of comportement

s0xDk commented 7 years ago

I confirm that. Seems like nested divs .emojionearea-button-open and .emojionearea-button-close are inheriting contenteditable mode.

Kuan93 commented 7 years ago

+1 for Firefox

floreean commented 7 years ago

i think this is related to the know firefox issue with 'contenteditable'. for me it only worked when i pass on the placeholder. i did it via css:

.emojionearea .emojionearea-editor:empty:before {
content: attr(placeholder); display: none; color: #bbb; }

a workaround/fix for this is highly appreciated ;)

dtelaroli commented 7 years ago

:+1:

MartinSchmid2409 commented 6 years ago

+1 for Firefox @ v3.2.2

zjw666 commented 6 years ago

+1 for Firefox

zjw666 commented 6 years ago
.emojionearea-editor:focus::before{
    content:none !important;
}

Add the codes above into your CSS file when you meet the same problem with Firefox.