From 1dd98b26e3ff84e34aa01a9dc660e5dc66061dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Wolff?= Date: Thu, 23 Sep 2010 12:20:06 +0100 Subject: [PATCH] dialog:Prevent clashing with augmented core javascript objects.#6099-Dialog options conflict with augmented javascript Object --- ui/jquery.ui.dialog.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 029f91905cf..890426170ac 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -358,6 +358,10 @@ $.widget("ui.dialog", { } if (hasButtons) { $.each(buttons, function(name, props) { + // If Object was augmented, we conflict with it by calling augmented object's method + if(!this.hasOwnProperty(name)) + return + props = $.isFunction( props ) ? { click: props, text: name } : props;