I just noticed that if you''re using the ok/cancel buttons in an IPE,
and you are using IE, then there is a bug that pops up due to how the
click events are attached to those buttons.
In IE, there is no event passed into the handleFormSubmission method,
so the event is not stopped from bubbling up, which causes the form to
be submitted. The quick fix for this is to drop a return false at the
end of handleFormSubmission (in an overrides file of course), but I
was curious why this bug only appeared whenever I was using ok/cancel
buttons but not when I had submitOnBlur set to true and ok/cancel
buttons turned off.
Turns out that the event observers are attached to the ok/cancel
buttons (in IPE#createControl) via old school styles:
btn.onclick = this._boundCancelHandler
This is clearly intentional, but why? Without an explicit ''return
false'' at the end of handleFormSubmission (since no event object is
passed in to stop), then the cancel button essentially is broken in
IE.
-justin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---