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>
http://www.whatwg.org/specs/web-apps/current-work/#dom-getselection

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:
https://bugzilla.mozilla.org/show_bug.cgi?id=585229
https://bugs.webkit.org/show_bug.cgi?id=43655

Ojan
-------------- 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.3.1 : Monday, 13 April 2015 23:08:59 UTC