[webkit-dev] Editable selection inside empty element

Frederico Caldeira Knabben fredck at fckeditor.net
Sat Sep 22 06:09:36 PDT 2007


> There are various different ways to test whether features work not so 
> well.

Not in the TC case... anyway, I'm not really here to advocate the best way
to do so. I'm sorry that the focus has been moved to the browser detection. 

I really hope some nice workaround suggestion could be found for the
selection problem instead.

Thanks for your comments Mike.

Fred
 

> -----Original Message-----
> From: Mike Hommey [mailto:mh at glandium.org]
> Sent: 22 September 2007 12:17
> To: Frederico Caldeira Knabben
> Cc: 'Mark Rowe'; webkit-dev at lists.webkit.org
> Subject: Re: [webkit-dev] Editable selection inside empty element
> 
> 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