W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] getSelection() in a display:none iframe

From: Ojan Vafai <ojan@chromium.org>
Date: Mon, 9 Aug 2010 13:23:42 -0700
Message-ID: <AANLkTimoxe3cwQm2Q8WvKWKBHKQq9vkA5t8wMgbGs0CS@mail.gmail.com>

Gecko returns null for a display:none iframe, but returns an empty Selection
object for a visible iframe with no selection. As best I can tell, WebKit
and Opera return a selection in both cases. I don't feel strongly about
which behavior is correct, but the spec should deal with this case.

On the one hand, the Gecko behavior makes sense because you can't have a
selection in a display:none frame, so the methods to set a selection would
fail. On the other hand, you can get into a similar situation by getting a
Selection and then making the iframe display:none, so that case needs to be
dealt with either way.

Relevant bugs:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100809/e54cfaad/attachment.htm>
Received on Monday, 9 August 2010 13:23:42 UTC

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