W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2014

Re: [whatwg] Document.activeElement should return the root element in non-HTML documents when no element has focus

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 3 Feb 2014 19:37:16 +0000 (UTC)
To: Cameron McCormack <cam@mcc.id.au>
Message-ID: <alpine.DEB.2.00.1402031931500.30855@ps20323.dreamhostps.com>
Cc: whatwg@whatwg.org
On Sat, 1 Feb 2014, Cameron McCormack wrote:
>
> Document.activeElement is currently defined to return the <body> element 
> if there is not element with focus, or null if there's no <body> 
> element.  I think it needs to return the root element when the document 
> isn't an HTML document (like an SVG document).

I'm actually about to completely revamp how focus is defined, so that it 
actually matches reality way better (e.g. right now the spec completely 
misses that it's the viewport that's focused when "nothing" is focused, 
and fails to even allow scroll regions to be focused, etc), and so that it 
properly supports <dialog>s as a separate kind of focusable object.

I have a detailed proposal here:

   https://www.w3.org/Bugs/Public/show_bug.cgi?id=23475#c16

I've noted your proposal above in comment 18.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 3 February 2014 19:38:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:15 UTC