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

Tags don't appear as tags after second row in textarea #64

Open
conner-fallone opened this issue Oct 4, 2016 · 2 comments
Open

Tags don't appear as tags after second row in textarea #64

conner-fallone opened this issue Oct 4, 2016 · 2 comments
Labels

Comments

@conner-fallone
Copy link

In the example page, put some random text in the text area to occupy at least 2 rows. If you put a tag in any row >= 3, the highlighting on the tag won't occur

@ivirabyan ivirabyan added the bug label Oct 14, 2016
@sbakic
Copy link

sbakic commented Nov 18, 2016

If you see carefully in example.html, height of the textarea or bottom line is the place where background-color of mentions disappear. So if you set height in order to have more rows, you will be able to see highlighted mentions, till a row which is located below initial height.

There is a workaround for this bug with resize: none; and setting initial height.

@lmfmaier
Copy link

lmfmaier commented Dec 7, 2016

I worked around this bug.

Set resize:none as mentioned above.

Use an autosize plugin (e.g. https://github.com/jackmoore/autosize/blob/master/src/autosize.js), which resizes the textarea automatically when the text doesn't fit anymore

Listen to the keyup event of the textarea and set the highlighter container's height to the textareas height:
$('textarea').on('keyup paste',function() { $(this).parent().find('.highlighter').css('height',$(this).css('height')); });

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

No branches or pull requests

4 participants