Bug Tracker

Ticket #5586 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

trigger(<event>) doesn't work in some cases with FireFox 3.5

Reported by: otiili Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: trigger Cc:
Blocking: Blocked by:

Description

I have encountered some problems with trigger(<event>) method in aspx page

the jQuery code sample is below:

jQuery(document).ready( function ( e ) {

...

$('.googlesearch').bind('keydown', function ( e ) {

if ( e.which == 13 ) {

$('.googlesubmit').trigger('click');

}

})

... })

and the aspx code sample is like this:

<asp:textbox ID="inputSearch" runat="server" AccessKey="4" OnTextChanged="SearchText_TextChanged" CssClass="quicksearchinput googlesearch" ToolTip='<%#Translate("/templates/search/quicksearch")%>' /> <asp:LinkButton runat="server" ID="QuickSearchButton" OnClick="QuickSearchButton_Click" CausesValidation="False" CssClass="submit button">

<input type="button" class="submit button googlesubmit" value="<%=Translate("/templates/search/quicksearch")%>" onclick="parentElement.click()"/>

</asp:LinkButton>

This works on ie7/8, Google Chrome but with FF3.5 the trigger doesn't seem to actually trigger click event.

I have tested this by adding alerts before $('.googlesubmit').trigger('click') , which does show and adding $('googlesubmit').click( function (e ) {

alert('foo')

}), which doesn't work ( neither, obviously, works the intended action )

Change History

comment:1 Changed 5 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

It would be best to get some help in the jQuery-en forums to see if this is a programming bug rather than a jQuery one. If it's narrowed down to jQuery, please reopen with a test case that does not require ASPX. You may be able to create one from the generated HTML. It should include only the minimum script and html required to demonstrate the issue.

Note: See TracTickets for help on using tickets.