[fsck.com #7646] Re: [rt-users] Combobox and href="#"
Thomas Sibley
trs at bestpractical.com
Thu Jun 29 14:27:44 EDT 2006
Todd Chapman wrote:
> On Thu, Jun 29, 2006 at 11:44:39AM -0400, Timothy Smith wrote:
>> The combobox custom field type in 3.6.0 is a great idea and I'd love to be able to put it to use. Unfortunately, clicking on the drop-down arrow makes the browser scroll to the top of the page, which destroys the user experience. Does anybody have a way to overcome this?
>
> The same happends with the calendar pop-up. :(
I know I made sure this didn't waaay back in the 3.5-TESTING branch.
But looking at the revision log of html/NoAuth/js/util.js, r4068 broke it.
http://svn.bestpractical.com/cgi-bin/index.cgi/bps/revision?rev=4068
When you use the onclick handler set via an attribute, returning false
will stop the event propagation (and hence moving to the top of the page
for hrefs="#"). When attaching events via other means, you need to
explicitly call the browser-specific method to stop the event from
propagating.
The easiest way to fix this is by far to switch back to using the
onclick attribute. I don't see how the r4068 improved browser
compatibility anyway.
Tom
More information about the rt-users
mailing list