Search and Top Navigation
#6768 closed bug (notabug)
Opened December 20, 2010 09:27PM UTC
Closed December 20, 2010 09:37PM UTC
Dialog box button iteration bug
Reported by: | SlappyZA | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.core | Version: | 1.8.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have stumbled on a edge case where by if the Array prototype has been extended, then when creating buttons using the button array for the modal dialog box, the function names of the extended prototype appear as buttons too. I suspect this is due to iterating over the button array using associative array loops instead of counter loops.
Steps to reproduce:
1: Create a function that extends the array prototype:
Array.prototype.someFunction = function () {}
2: Create a dialog:
$('#element').dialog({ modal: true, buttons: [ { text: 'Select', click: function(){} }, { text: 'Cancel', click: function() {} } ] });
Expected Result:
There will be three buttons on the dialog: Select, Cancel and someFunction
Attachments (0)
Change History (1)
Changed December 20, 2010 09:37PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
We don't support modifying native prototypes.