RE: [webkit-dev] Editable selection inside empty element

2007-09-22 Thread Frederico Caldeira Knabben
Rob,

I've filled the following ticket:

http://bugs.webkit.org/show_bug.cgi?id=15256

I think it has nothing to do with 10881 (which is a serious bug I think I've
faced too), and I'm unsure about it's relation with 10883. I'm leaving core
developers to decide here.

Fred

 
 -Original Message-
 From: Rob Burns [mailto:[EMAIL PROTECTED]
 Sent: 22 September 2007 04:19
 To: Frederico Caldeira Knabben
 Cc: webkit-dev@lists.webkit.org
 Subject: Re: [webkit-dev] Editable selection inside empty element
 
 Hi Fred,
 
 I was struggling with the same issue of setting the selected DOM
 range to an empty element. I believe there's a bug filed on it.
 
 http://bugs.webkit.org/show_bug.cgi?id=10883
 http://bugs.webkit.org/show_bug.cgi?id=10881
 
 What I've been toying with is adding zero-width spaces to elements
 and then cleaning up after those characters or the elements
 themselves if the author doesn't add content to the element.
 
 Its a pretty serious bug however for any editor trying to do real
 semantic editing.
 
 Take care,
 Rob
 
 On Sep 21, 2007, at 6:53 AM, Frederico Caldeira Knabben wrote:
 
  Hi,
 
  It is a pleasure to say that FCKeditor is almost completely working
  with
  Safari. There are still some issues, but we'll be able to finally
  declare
  official support for Safari 3. Thanks for the hard work at WebKit's
  side.
 
  Now, back to the point...
 
  For the few big issues we are having with Safari, I'm going almost
  crazy,
  trying to find a way to place the caret inside an empty element for
  editing.
  To understand the problem, just try the following page:
 
  http://www.fredck.com/bugs/safari/collapsed_select_test.html
 
  This page works well with Firefox 2 and Opera 9.5 (minor issues
  with this
  one).
 
  Before opening a bug report for it, I'm coming to the mailing list
  for a
  desperate call for help.
 
  Does anyone know any weird hack to make the magic happen with
  Safari too?
  I've tried hundreds of combinations, but none worked correctly.
 
  Thanks for any help in this sense.
 
  Fred
 
  Frederico Caldeira Knabben
  Project Manager, FCKeditor
  
  http://www.fckeditor.net
 
 
 
  ___
  webkit-dev mailing list
  webkit-dev@lists.webkit.org
  http://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


RE: [webkit-dev] Editable selection inside empty element

2007-09-22 Thread Frederico Caldeira Knabben
 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:[EMAIL PROTECTED]
 Sent: 22 September 2007 12:17
 To: Frederico Caldeira Knabben
 Cc: 'Mark Rowe'; webkit-dev@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
 [EMAIL PROTECTED] 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

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Editable selection inside empty element

2007-09-21 Thread Frederico Caldeira Knabben
Hi,

It is a pleasure to say that FCKeditor is almost completely working with
Safari. There are still some issues, but we'll be able to finally declare
official support for Safari 3. Thanks for the hard work at WebKit's side.

Now, back to the point...

For the few big issues we are having with Safari, I'm going almost crazy,
trying to find a way to place the caret inside an empty element for editing.
To understand the problem, just try the following page:

http://www.fredck.com/bugs/safari/collapsed_select_test.html

This page works well with Firefox 2 and Opera 9.5 (minor issues with this
one). 

Before opening a bug report for it, I'm coming to the mailing list for a
desperate call for help.

Does anyone know any weird hack to make the magic happen with Safari too?
I've tried hundreds of combinations, but none worked correctly.

Thanks for any help in this sense.

Fred

Frederico Caldeira Knabben
Project Manager, FCKeditor

http://www.fckeditor.net



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Editable selection inside empty element

2007-09-21 Thread Mark Rowe


On 21/09/2007, at 21:53, Frederico Caldeira Knabben wrote:

For the few big issues we are having with Safari, I'm going almost  
crazy,
trying to find a way to place the caret inside an empty element for  
editing.

To understand the problem, just try the following page:

http://www.fredck.com/bugs/safari/collapsed_select_test.html

This page works well with Firefox 2 and Opera 9.5 (minor issues with  
this

one).

Before opening a bug report for it, I'm coming to the mailing list  
for a

desperate call for help.


Please do file a bug report on this at http://bugs.webkit.org/.  I'm  
not an expert on editing support by any means, but the behaviour you  
are expecting to see from the test case sounds correct.


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.


Kind regards,

Mark Rowe

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev