needim / wdt-emoji-bundle

Slack like emoji picker with apple/ios, twitter/twemoji, google, emojione, facebook, messenger emoji support
http://ned.im/wdt-emoji-bundle
MIT License
419 stars 87 forks source link

Multiple Dynamic Textarea : Cannot read property 'getAttribute' of null #9

Open imerkle opened 7 years ago

imerkle commented 7 years ago

Im doing

wdtEmojiBundle.init('.txt1'); wdtEmojiBundle.init('.txt2'); `

When clicking the emoticon on .txt2 it shows the error Cannot read property 'getAttribute' of null

Is there any way to apply emoticon on multiple textarea which are added dynamically using ajax/jquery etc

var getSelection = function (el) { var result = {};

if (el.getAttribute('contenteditable')) { //####error in this line here
  return {
    el: el,
    ce: true
  }
}
aleksey6689 commented 6 years ago

I have the same problem

Jake0303 commented 6 years ago

Same here :(