The ui argument for my popupbeforeposition event handler is empty

The ui argument for my popupbeforeposition event handler is empty

I have a JQM page with a popup and I have subscribed to the "popupbeforeposition" event with this line:

  1. $(document).on({ popupbeforeposition : populatePopupForm });

the populatePopupForm function has this signature:

  1. function populateForm(event, ui) { ... }

This works excellently, except my ui argument is empty ... as in: {} - when I console.log it, the object is empty.

The event argument is full of data, but none of which tells me what element triggered the event (which is what I need to populate the form in the popup.

Is there any good explanation to this? (No, I did not search the JQM source to see how it's triggered ... and no, the binding of popupbeforeposition is NOT done in a data-role="page" container., and no I did not provide a jsFiddle as the console.log does not seem to work in jsFiddle.)