bilalq / Tranquillity-Editor

An IDE for poets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poem placeholder text looks bad in Firefox because of extra whitespace

roryokane opened this issue · comments

In Google Chrome, the poem’s placeholder text looks fine:

placeholder text in Chrome

In Firefox, it has extra whitespace:

placeholder text in Firefox

This is because the HTML has extra whitespace:

            <textarea class="poetry-text linked" placeholder="Your poem goes here,                                                                                                                                                                                                       
              no more need you fear."></textarea>

It looks like Chrome ignores the whitespace except for the newline, while Firefox preserves all of it. The fix is probably to change the HTML to this:

            <textarea class="poetry-text linked" placeholder="Your poem goes here,
no more need you fear."></textarea>

That's definitely a problem. However, there's no real solution for getting a newline into a textarea placeholder that I'm aware of. We were using this hack up till now, but as you pointed out, it only works on Chrome.

I suppose we could change the text for Chrome/Safari through Javascript to have extra whitespace in between the two lines of the placeholder. Does anyone else have a better solution?