Search and Top Navigation
#6099 closed bug (wontfix)
Opened September 23, 2010 11:18AM UTC
Closed September 23, 2010 01:02PM UTC
Last modified October 11, 2012 09:15PM UTC
Dialog options conflict with augmented javascript Object
Reported by: | Lupus Michaelis | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.dialog | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When you augment the core Javascript Object like that:
Object.prototype.base = function(attribute)
{ /* Do whatever you want */ }
It conflicts with the handling of options in UI.Dialog. It iterates each attribute of the options object, assuming the core Object is bare and never was modified. By the way, UI.Dialog assume that function in option objects are actual HTML objects or equivalent. Add a check could be a good idea.
So said, I did a quickfix that discards attributes from the prototype chain. But they're maybe a clever way to fix it (like check the options are awaited).
I did a pull request.