[Scriptaculous] Focus inputfield in lightbox

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Scriptaculous] Focus inputfield in lightbox

Christian Haider
Hi,
 
I wanted to set the focus to an inputfield in a dialog (call:ed WAComponent) so that the user can just start typing.
This works fine with #setFocus when I use #call: but doesnt when using #lightbox:.
 
The problem is that #setFocus and #lightbox: are using scripts. Unfortunately the #lightbox: script is added AFTER the #setFocus script and the second undoes the effect of the first.
 
In the attachment is a patch (override :-( ) which prepends the #lightbox script before already existing ones. That solves the problem for me, but I have no idea how other script using components would interact with this...
 
This is quite hacky. Is there another cleaner way to set the focus in a lightbox?
 
cheers,
    Christian
 

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

LightboxFocusInputPatch.st (740 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Scriptaculous] Focus inputfield in lightbox

Lukas Renggli
> This is quite hacky. Is there another cleaner way to set the focus in a
> lightbox?

I think it makes sense to add the script to the beginning of the list.
This is fixed in Seaside 2.9. Thanks for reporting.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside