You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Lundberg <pe...@gmail.com> on 2009/03/15 17:23:04 UTC

Autocomplete problems in IE

Hi,
I have a nice web-app that was a pleasure to write in T5; but am running
into problems that I need some help with. The autocomplete mixin works just
fine in FF3 etc but there is a issue that seriously affects its usability in
IE (I have only tested 7) and end-users are complaining. When typing the
autocomplete fails the first time the field is used, only clearing the field
and typing again will get autocomplete to work in IE. SO users with IE
either think there is no autocomplete or think it is horribly slow and
flaky. Its also rather central to my apps utility.

This seams to be a problem with prototype; I found some information and
workarounds in other environments, but no fix seams to be in the works. See
for instance 
http://stackoverflow.com/questions/108650/script-aculo-us-autocompleter-problem-in-ie/
for more information. 

So how can I solve this now in 5.0.18?

One option would be to follow the suggested js hack - but how to insert the
javascript at the expected place (after or when autocomplete.js gets
loaded)? Another is to patch prototype; but how then keep that cleanly
separate in my project? Both involve some form of asset overriding that I
can figure out how to do without making my own builds of t5-core or
prototype.

Or perhaps someone has a better solution? An alternative autocomplete
component that works in IE?

BR
Peter
-- 
View this message in context: http://www.nabble.com/Autocomplete-problems-in-IE-tp22524872p22524872.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Autocomplete problems in IE

Posted by Peter Lundberg <pe...@gmail.com>.

I just wanted to followup with my workaround for others.


Firstly one could override assets, or at least this asset, using the
classpath. Eg. createing your own 
src/main/resources/org/apache/tapestry5/corelib/mixins/autocompelte.js
would cause it to get loaded instead of tapestrys. 



However, I looked into first upgrading to the latest (1.8.2/1.6.0.3)
release. Just place all files on your classpath (I used
src/main/resources/com/xxyy/scriptaculous_1_8_2/) and add the following to
your module in contributeApplicationDefaults: 

configuration.add("tapestry.scriptaculous",
"classpath:com/xxyy/scriptaculous_1_8_2/"); 
 By all files I mean the deployed .js including prototype and not just the
src js from scriptaculous.



This release did not help with the autocompleter issue in IE; so I
researched into using the patch outlined by jrochkind in 
http://prototype.lighthouseapp.com/projects/8887/tickets/32-ajax-autocomplete-in-ie-with-doctype
prototyp ticket 32  replacing 

"var offsetParent = element.getOffsetParent();" 
 with  

"var offsetParent = (element.parent) ? element.getOffsetParent() : 0;"

in prototype.js in the above override directory.



And voila my users are happy. Autocomplete and what other things I use work
fine. 


There could be other sideaffects so use normal caution using this patch and
monitor to see if there is a newer release of prototype or scriptaculous.


Hope this helps someone else, and please let me know if there are better
solutions!


-- 
View this message in context: http://www.nabble.com/Autocomplete-problems-in-IE-tp22524872p22553376.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Autocomplete problems in IE

Posted by Peter Lundberg <pe...@gmail.com>.
Thanks, yes that would be the way to replace scriptaculous with a patched
version. 

How could one replace or complement the autocomplete.js that is part of
tapestry-core? Is creating my own component or tapestry-core.jar the only
way? I want as little code for this in my project, I would expect some
solution to turn up from prototype and then do not want to have too much to
maintain.

Or does someone have another way (is using autcomplete successfully in IE
with T5)?

Br
Peter


周清博 wrote:
> 
> Hi Peter,
> 
> You can have a look at this page:
> 
> http://tapestry.apache.org/tapestry5/guide/conf.html
> 
> Near the bottom there's a configuration option:
> 
> tapestry.scriptaculous
>     The path to the embedded copy of script.aculo.us packaged with
> Tapestry. This value may be overridden to use a different version of
> the script.aculo.us library. Tapestry's default version is 1.8.1
> (including Prototype 1.6.0.1).
> 
> So you can have your patched scripts in your own directory and add
> this configuration symbol to your web.xml file pointing to the
> directory.
> 
> On Mon, Mar 16, 2009 at 12:23 AM, Peter Lundberg
> <pe...@gmail.com> wrote:
>>
>> Hi,
>> I have a nice web-app that was a pleasure to write in T5; but am running
>> into problems that I need some help with. The autocomplete mixin works
>> just
>> fine in FF3 etc but there is a issue that seriously affects its usability
>> in
>> IE (I have only tested 7) and end-users are complaining. When typing the
>> autocomplete fails the first time the field is used, only clearing the
>> field
>> and typing again will get autocomplete to work in IE. SO users with IE
>> either think there is no autocomplete or think it is horribly slow and
>> flaky. Its also rather central to my apps utility.
>>
>> This seams to be a problem with prototype; I found some information and
>> workarounds in other environments, but no fix seams to be in the works.
>> See
>> for instance
>> http://stackoverflow.com/questions/108650/script-aculo-us-autocompleter-problem-in-ie/
>> for more information.
>>
>> So how can I solve this now in 5.0.18?
>>
>> One option would be to follow the suggested js hack - but how to insert
>> the
>> javascript at the expected place (after or when autocomplete.js gets
>> loaded)? Another is to patch prototype; but how then keep that cleanly
>> separate in my project? Both involve some form of asset overriding that I
>> can figure out how to do without making my own builds of t5-core or
>> prototype.
>>
>> Or perhaps someone has a better solution? An alternative autocomplete
>> component that works in IE?
>>
>> BR
>> Peter
>> --
>> View this message in context:
>> http://www.nabble.com/Autocomplete-problems-in-IE-tp22524872p22524872.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Zhou Qingbo (周清博)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Autocomplete-problems-in-IE-tp22524872p22532040.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Autocomplete problems in IE

Posted by Qingbo Zhou <zh...@gmail.com>.
Hi Peter,

You can have a look at this page:

http://tapestry.apache.org/tapestry5/guide/conf.html

Near the bottom there's a configuration option:

tapestry.scriptaculous
    The path to the embedded copy of script.aculo.us packaged with
Tapestry. This value may be overridden to use a different version of
the script.aculo.us library. Tapestry's default version is 1.8.1
(including Prototype 1.6.0.1).

So you can have your patched scripts in your own directory and add
this configuration symbol to your web.xml file pointing to the
directory.

On Mon, Mar 16, 2009 at 12:23 AM, Peter Lundberg
<pe...@gmail.com> wrote:
>
> Hi,
> I have a nice web-app that was a pleasure to write in T5; but am running
> into problems that I need some help with. The autocomplete mixin works just
> fine in FF3 etc but there is a issue that seriously affects its usability in
> IE (I have only tested 7) and end-users are complaining. When typing the
> autocomplete fails the first time the field is used, only clearing the field
> and typing again will get autocomplete to work in IE. SO users with IE
> either think there is no autocomplete or think it is horribly slow and
> flaky. Its also rather central to my apps utility.
>
> This seams to be a problem with prototype; I found some information and
> workarounds in other environments, but no fix seams to be in the works. See
> for instance
> http://stackoverflow.com/questions/108650/script-aculo-us-autocompleter-problem-in-ie/
> for more information.
>
> So how can I solve this now in 5.0.18?
>
> One option would be to follow the suggested js hack - but how to insert the
> javascript at the expected place (after or when autocomplete.js gets
> loaded)? Another is to patch prototype; but how then keep that cleanly
> separate in my project? Both involve some form of asset overriding that I
> can figure out how to do without making my own builds of t5-core or
> prototype.
>
> Or perhaps someone has a better solution? An alternative autocomplete
> component that works in IE?
>
> BR
> Peter
> --
> View this message in context: http://www.nabble.com/Autocomplete-problems-in-IE-tp22524872p22524872.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Zhou Qingbo (周清博)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org