W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] Should editable elements have placeholder attribute?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 6 Sep 2012 08:30:18 -0700
Message-ID: <CAAWBYDDh+-4PrqJti2NsEw-M58w+rFstB7oD_FNMr-hyoQgXLw@mail.gmail.com>
To: Aryeh Gregor <ayg@aryeh.name>
Cc: whatwg@lists.whatwg.org
On Thu, Sep 6, 2012 at 3:56 AM, Aryeh Gregor <ayg@aryeh.name> wrote:
> It should never be possible to make a contenteditable element contain
> nothing, once it has something in it, because then it would collapse
> to zero height and you wouldn't be able to click on it.  (IIRC, some
> browsers have non-standard special cases for contenteditable elements
> and make them one line high even if they're empty, but this isn't per
> spec.)

Note that this shouldn't be hard to do without magic.  Just something
like this in the UA style sheet:

[contenteditable]:empty { min-height: 1em; }

Received on Thursday, 6 September 2012 15:32:31 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC