Buttonsnap updates?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Buttonsnap updates?

John Vanderbeck
Hey all,

This is my first post to the the list, and my apologies if this isn't list
material.  I tend to just lurk on the list and grab bits of useful
information :)  However I know others use this library as well, and since
this its a singleton this would affect anyone else who uses it in thier
plugin.

Recently I was using buttonsnap to add buttons for my plugin, jPortfolio (
http://www.jwvanderbeck.com/wordpress-plugins/jportfolio/), and ran  into a
bug in the library that prevents the AJAX Filter based button from working
properly under Firefox when using the "basic" editor, not the visual rich
editor.  Upon further research I found that the code was using a javascript
method for getting the selection that is not supported on all browsers
(There is to my knowledge no standard method for getting the selection).  My
research showed the method used mainly only worked on IE based browsers, and
possibly Opera, but not Mozilla based browsers.

I dug around a bit, and rewrote the code to use a combination of methods to
try and get the selection from the browser and now have code that works, as
far as I can tell throguh some quick testing, on all major browsers.  It
worked for me under IE 6, FireFox (Latest), and Opera (Latest).  Since it
works under FireFox it SHOULD also work under Mozilla but I did not test
that.

I was wondering what I would need to do to get this code change rolled into
buttonsnap in some form?  Since this is a singleton class it really needs to
be updated for everyone that uses it or else problems may develop.

Thank you for your time :)

--
- John Vanderbeck
- http://www.jwvanderbeck.com
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Buttonsnap updates?

Owen Winkler
John Vanderbeck wrote:
> Recently I was using buttonsnap to add buttons for my plugin, jPortfolio (
> http://www.jwvanderbeck.com/wordpress-plugins/jportfolio/), and ran  into a
> bug in the library that prevents the AJAX Filter based button from working
> properly under Firefox when using the "basic" editor, not the visual rich
> editor.  Upon further research I found that the code was using a javascript
> method for getting the selection that is not supported on all browsers
> (There is to my knowledge no standard method for getting the selection).  My
> research showed the method used mainly only worked on IE based browsers, and
> possibly Opera, but not Mozilla based browsers.

Hmm.  I was using code from the Quicktags plugin, and it seemed to work
to me, but if you say it doesn't...

> I was wondering what I would need to do to get this code change rolled into
> buttonsnap in some form?  Since this is a singleton class it really needs to
> be updated for everyone that uses it or else problems may develop.

You've sent me this code already, haven't you?  I just need to roll it
in and test it.  There are another couple of things that I need to
add/change in Buttonsnap that I'm hoping to do before making a new
official release.

Owen

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Buttonsnap updates?

John Vanderbeck
On 4/12/06, Owen Winkler <[hidden email]> wrote:

> John Vanderbeck wrote:
> > Recently I was using buttonsnap to add buttons for my plugin, jPortfolio (
> > http://www.jwvanderbeck.com/wordpress-plugins/jportfolio/), and ran  into a
> > bug in the library that prevents the AJAX Filter based button from working
> > properly under Firefox when using the "basic" editor, not the visual rich
> > editor.  Upon further research I found that the code was using a javascript
> > method for getting the selection that is not supported on all browsers
> > (There is to my knowledge no standard method for getting the selection).  My
> > research showed the method used mainly only worked on IE based browsers, and
> > possibly Opera, but not Mozilla based browsers.
>
> Hmm.  I was using code from the Quicktags plugin, and it seemed to work
> to me, but if you say it doesn't...

Well it defintly wasn't working for me with Firefox 1.5.0.1 when in
the standard editor.  My hook always received a blank selection no
matter what.

>
> > I was wondering what I would need to do to get this code change rolled into
> > buttonsnap in some form?  Since this is a singleton class it really needs to
> > be updated for everyone that uses it or else problems may develop.
>
> You've sent me this code already, haven't you?  I just need to roll it
> in and test it.  There are another couple of things that I need to
> add/change in Buttonsnap that I'm hoping to do before making a new
> official release.
>

I had posted about the issue in your support forum but I never got any
reply so I didn't know if it was seen or not.  I posted the code I
came up with in there as well.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...