Skip to content

Seems to have problems when binding to the event further up the DOM #1

@chrisnicola

Description

@chrisnicola

I have a page that loads form elements dynamically after load. In order to catch events fired by these elements I have attached to the event further up the DOM like this:

  $('body').on 'txtinput', '[data-toggle=clear]', (e) ->

However after the first text box I interact with none of the ones I interact with after that fire the event correctly.

I'm using the latest Chrome on OSX.

Tracing through it quickly the problem seems to be with how the event is bound if isSupported(elem) is false using the dlgtTo events. Anyways I'd try for a fix, but give that this library is attempting to be 100% cross-browser compatible I think it might be a bit hard.

Anyways an alternative fallback I've taken the approach of just polling any focused textboxes every 500ms or so. This approach could simply be "skipped" for browser that properly support the new "input" events. It isn't perfect, but it works for most scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions