- From: Charles McCathie Nevile <chaals@yandex-team.ru>
- Date: Fri, 21 Feb 2014 14:40:20 +0100
- To: whatwg <whatwg@lists.whatwg.org>, "Steve Faulkner" <faulkner.steve@gmail.com>
On Fri, 21 Feb 2014 09:47:51 +0100, Steve Faulkner <faulkner.steve@gmail.com> wrote: > hixie wrote: > >> But there's plenty of things which make zero sense as fallback content. >> <input type=color>, for example, simply cannot be sanely implemented in >> canvas I don't want to pronounce on sanity, but I don't think it has ever been a major criterion for whether people *will* do something on the Web. And it seems pretty easy to make a colour picker in canvas. I can imagine that anyone who wanted a specific-purpose color picker (styled to match the site, or customising the options, or...) would do it in canvas or SVG, and my guess is the former would be more common... cheers Chaals > as implemented input type=color is a button that when activated pops up a > picker dialog. So the following code (as a simple example) > > <canvas id="myCanvas" width="200" height="100" > style="border:1px solid #000000;" > onclick="document.getElementById('button').click();"> > <input type="color"" id="button"> > </canvas> > > in Firefox 30/windows when the canvas is clicked the color picker is > displayed., likewise if the the input receives focus via the keyboard and > the enter/spacebar key is pressed the picker dialog is displayed. > -- > > Regards > > SteveF > HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/> -- Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex chaals@yandex-team.ru Find more at http://yandex.com
Received on Friday, 21 February 2014 13:40:47 UTC