I've run into this same thing before, and it's certainly a strange
beast.  I was not able to solve it with any of the above techniques,
or even by canceling the event unobtrusively with e.preventDefault().

However, if I remember correctly, the problem went away only after I
added additional content to the page being loaded by ajax.  So, it
seems to have something to do with the browser not being able to
calculate the proper scroll position when page height changes by
certain page length to browser height ratios.

It sounds like your page is updating a dropdown instead of content, so
not sure if this is the same problem, but just for fun, try adding
some more dummy content at the bottom of the page to make it really
long. See if that has any effect.

Peter



On Tue, Aug 25, 2009 at 5:17 PM, James Miller<[email protected]> wrote:
> javascript:void(0); will work, but it's obtrusive.  Are you using onclick=
> in your anchor tags or unobtrusive event handlers in your JS file?
>
> On Tue, Aug 25, 2009 at 5:12 PM, Dan Simpson <[email protected]> wrote:
>>
>> Try href="javascript:void(0);"
>>
>> --Dan
>>
>> On Tue, Aug 25, 2009 at 5:09 PM, Guyren G Howe <[email protected]> wrote:
>>>
>>> On Aug 25, 2009, at 17:01 , James Miller wrote:
>>>
>>> > Do you need to return false; to prevent further execution?  What's
>>> > triggering the ajax request?
>>>
>>> That doesn't help.
>>>
>>> Actually, I described this a bit wrong. I've done an ajax request and
>>> displayed a set of options for the user. This is called by the user
>>> clicking on one of those options. The ajax update that preceded it
>>> actually works fine.
>>>
>>> > Does the action that triggers the ajax call happen to be a link with
>>> > an anchor? <a href="#" ... /> ... that can cause your problem
>>>
>>> Yes. Do you know a solution?
>>>
>>> Regards,
>>>
>>> Guyren G Howe
>>> Relevant Logic LLC
>>>
>>> guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178
>>>
>>> Ruby/Rails,  REALbasic, PHP programming
>>> PostgreSQL, MySQL database design and consulting
>>> Technical writing and training
>>>
>>> Read my book, Real OOP with REALbasic:
>>> <http://relevantlogic.com/oop-book/about-the-oop-book.php
>>>  >
>>>
>>>
>>>
>>
>>
>>
>
>
> >
>



-- 
Peter Gumeson
[email protected]

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to