Bug Tracker

Modify

Ticket #5586 (closed bug: invalid)

Opened 4 years ago

Last modified 4 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 4 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.