#3260 closed bug (notabug)
dialog: toJSONString button
Reported by: | Owned by: | Scott González | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.dialog | Version: | 1.6b |
Keywords: | dialog, buttons | Cc: | |
Blocked by: | Blocking: |
Description
in my javascript code i have this function:
Object.prototype.toJSONString = function (w) ....
so every object has this function.
if i create a UI jQuery dialog i get a [toJSONString] button even if i don't declare any buttons in the dialog options (and also if i declare some buttons)
i suppose that any function added to Object.prototype will produce a button in the dialog.
isn't it better to avoid this behavior and insert a way to remove unwanted buttons or to show only desired ones?
Note: See
TracTickets for help on using
tickets.
Yes, it's possible for us to skip this property and not create a button for it. However, you should never modify Object.prototype. This is unsupported by jQuery and jQuery UI.