This issue is a side-effect of #259577: integration with Fckeditor (type of link not changed to 'other' , in which a second line of triggers was added. We currently have these two lines of code:

    try{doc.find('#'+ appFields['url']).blur().change().focus()}catch(e){};
    try{doc.find('#'+ appFields['url']).trigger('onblur').trigger('onchange').trigger('onfocus')}catch(e){};//inline events

The problem is that the first one only fires in Firefox, Safari, or other respectable browsers. The second one fires for ALL browsers though, including versions of IE, Firefox, and Safari. The end result of this is that the events fire twice in browsers that work with both implementations.

Rather than using both approaches, deleting the first line makes it so that only one approach is used, which works in all browsers. In my particular use-case, I have an onchange function that triggers an AHAH request, so firing twice generates an unnecessary HTTP request.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ufku’s picture

Thanks for the patch.
I tested this a bit and saw that removing the first line prevents triggering events set by jquery for the field.
The second line is IE specific for fixing cross-frames event triggering, which can be made run on IE only.
I'll provide a patch soon.

ufku’s picture

FileSize
950 bytes

I've made the try statements nested. First one throws an error in IE and then the second one runs.
I didn't check it on safari.

quicksketch’s picture

Ah, nice. I'll try it out with my implementation and see if it corrects the problem.

ufku’s picture

Status: Needs review » Fixed

This has been committed. Please re-open in case of any appearing bugs.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.