[webkit-dev] Editable selection inside empty element
Mike Hommey
mh+webkit at glandium.org
Sat Sep 22 03:20:29 PDT 2007
(sorry for the duplicate)
On Sat, Sep 22, 2007 at 12:11:27PM +0200, Frederico Caldeira Knabben <fredck at fckeditor.net> wrote:
> Thanks for the reply Mark. I've filled the following bug for it:
>
> http://bugs.webkit.org/show_bug.cgi?id=15256
>
>
> > On an unrelated note,
> > // For Safari and Opera, we must ensure the focus.
> > if ( (/safari/i).test( navigator.userAgent ) )
> >
> > It is almost never correct to test for "Safari" specifically. WebKit is
> > what you should be aiming to detect. This will ensure that your code
> > functions correctly in other WebKit-based browsers, such as OmniWeb,
> > Shiira, NetNewsWire, etc.
>
> That was just useful for the TC. But you are right; I'll take care of using
> the recommended way:
>
> (/ AppleWebKit\//).test( navigator.userAgent )
Actually, this is as bad as testing for safari. You should test
features, not user agents.
Mike
More information about the webkit-dev
mailing list