Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'offsetHeight' of undefined #10

Closed
sam2x opened this issue Jun 29, 2015 · 3 comments
Closed

Cannot read property 'offsetHeight' of undefined #10

sam2x opened this issue Jun 29, 2015 · 3 comments

Comments

@sam2x
Copy link

sam2x commented Jun 29, 2015

Hey, everytime i run the webpage with the emoji code i got the following error :

TypeError: Cannot read property 'offsetHeight' of undefined
   at emojiDirectives.js:145
   at angular.js:16380
   at completeOutstandingRequest (angular.js:4940)
   at angular.js:5328

Tracking the line code, the error is from :

     var height = richTextarea.offsetHeight;

So richTextarea is undefined. I don't get why... He should be instanciated by the following line 30 of emojiDirectives.js :

         richTextarea = $(
                '.emoji-wysiwyg-editor', element)[0];

.emoji-wysiwyg-editor is supposed to be added by jquery.emojiarea.js on line 339 :

    this.$editor = $('<div>').addClass('emoji-wysiwyg-editor');

Has anyone got this error ? Any pointers would be appreciated.

@sam2x
Copy link
Author

sam2x commented Jun 29, 2015

Ok, nevermind, i solved it. i attributed "emoji-form emoji-message" inside a tag who already has a personal directive, seems it skiped the code triggered by this marker.
Just another question : is that possible to use it with a "input" widget and not a contenteditable ?

@madhur
Copy link
Contributor

madhur commented Nov 15, 2015

👍 Right now its only possible with contenteditable

@madhur madhur closed this as completed Nov 15, 2015
@blended-ideas
Copy link

@sam2x
How did you resolve this problem?
Even I'm using is inside a tag which is part of another directive. The way I've modeled it requires it to be a part of directive's template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants