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

TextArea height not getting set #25

Closed
socialltd opened this issue Apr 13, 2016 · 3 comments
Closed

TextArea height not getting set #25

socialltd opened this issue Apr 13, 2016 · 3 comments

Comments

@socialltd
Copy link

If we apply this to TextArea element the height of resultant DIV is not adjusted as per the TextArea rows. To achieve this I added the following line of code..

jquery.emojipicker.js

--look for this block --

if ($textarea.attr('maxlength')) {
      this.$editor.attr('maxlength', $textarea.attr('maxlength'));
    }

    var unicodeToImageText = this.emojiPopup.unicodeToImage($textarea.val());
        this.$editor.html(unicodeToImageText);
        this.$editor.attr({
            'data-id': id,
            'data-type': 'input',
            'placeholder': $textarea.attr('placeholder'),
            'contenteditable': 'true',
        });


--REPLACE with this block---


if ($textarea.attr('maxlength')) {
      this.$editor.attr('maxlength', $textarea.attr('maxlength'));
    }

        this.$editor.height($textarea.outerHeight()); //auto adjust height

    var unicodeToImageText = this.emojiPopup.unicodeToImage($textarea.val());
        this.$editor.html(unicodeToImageText);
        this.$editor.attr({
            'data-id': id,
            'data-type': 'input',
            'placeholder': $textarea.attr('placeholder'),
            'contenteditable': 'true',
        });

@wokaole
Copy link

wokaole commented Apr 11, 2017

it help me ,tks

@vitormarcelino
Copy link

Thanks!

@TimBest
Copy link
Contributor

TimBest commented Jun 20, 2017

fixed in this commit 5dc2afa

@TimBest TimBest closed this as completed Jun 20, 2017
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

4 participants