FLUID-2247: Change argument list for activationHandler to agree with jQuery defaults

Metadata

Source
FLUID-2247
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Justin Obara
Reporter
Antranig Basman
Created
2009-02-17T12:27:08.000-0500
Updated
2009-11-13T08:58:32.000-0500
Versions
N/A
Fixed Versions
  1. 1.1
Component
  1. Keyboard Accessibility

Description

As part of FLUID-2243, the return value of the activation handler was adjusted to agree with jQuery/browser defaults. Changing the argument list to also conform, that is, to consist of a single argument which is a jQuery event, should also be done, but was too significant a change for the 0.8 release. This needs to be done for 1.0, documentation, test cases and all samples updated.

Comments

  • Colin Clark commented 2009-04-14T11:44:15.000-0400

    This issue wasn't actually fixed in Infusion 1.0. On line 591 of jquery.keyboard-a11y.js, you can see the code that invokes the activation handler:

    var ret = binding.activateHandler(evt.target, evt);

    So we're still invoking it in the weird two-arg style that I introduced way back in the first version.

  • Justin Obara commented 2009-05-21T15:35:38.000-0400

    Bug Parade 1.1 release

  • Antranig Basman commented 2009-05-25T22:49:40.000-0400

    In attempting to resolve this, I found it impossible - note that part of our contract is to allow a non-arg invocation of the form $(activatable).activate() - this call does not give rise to a jQuery event since "activate" is not registered with the overall jQuery system. Therefore no event can be delivered as the first argument to the activateHandler - whereas a DOM element can.
    Kicking this back upstairs - there seem to be only two options, i) continue with our current signature, and document even more carefully that the "evt" 2nd argument may sometimes be missing, or else ii) upgrade "activate" to be a top-level genuine jQuery event.

  • Colin Clark commented 2009-05-26T15:58:24.000-0400

    After a brief discussion in the channel, we agreed that we'll create a real jQuery custom event called "fluid-activate." While this name is slightly awkward, it will prevent any namespacing conflicts with other custom events. Most users will not need to know this particular implementation detail, though. 🙂

    http://wiki.fluidproject.org/display/fluid/fluid-work+IRC+Logs-2009-05-26 starting at about [15:28:00 EDT(-0400)]

  • Antranig Basman commented 2009-05-26T22:44:50.000-0400

    Implemented as discussed with "fluid-activate" event. Test cases adjusted - there are believed to be no usages of this callback anywhere in the framework and samples, so this should hopefully cause no further disruption. This new model is somewhat more straightforward than the old implementation and has allowed us to save some code. However, the plugin as a whole still needs a fair amount of work to streamline its idiom.

  • Justin Obara commented 2009-11-13T08:58:32.000-0500

    Closed as per previous comment