Search and Top Navigation
#14947 closed bug (notabug)
Opened April 12, 2016 10:00AM UTC
Closed October 12, 2016 03:57PM UTC
Uncaught TypeError: Cannot read property 'eq' of undefined
| Reported by: | Johnnii360 | Owned by: | Johnnii360 |
|---|---|---|---|
| Priority: | minor | Milestone: | none |
| Component: | ui.selectmenu | Version: | 1.12.0-rc.1 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
Hi there!
The bug is already there in the actual jQ-UI v1.12.0-rc1 release.
e.widget._getSelectedItem @ jquery-ui.min.js:11 (anonymous function) @ jquery-ui.min.js:6 e.widget.refresh @ jquery-ui.min.js:11 (anonymous function) @ jquery-ui.min.js:6 (anonymous function) @ jquery-ui.min.js:6 n.extend.each @ jquery.min.js:2 n.fn.n.each @ jquery.min.js:2 e.fn.(anonymous function) @ jquery-ui.min.js:6 (anonymous function) @ custom.js:2041 i @ jquery.min.js:2 j.fireWith @ jquery.min.js:2 z @ jquery.min.js:4 (anonymous function) @ jquery.min.js:4
Here my code for some debugging:
open: function(){
$.getJSON('ajax/dokumente_dialogs_formitems.php?item=newfile_categories', function(data){
var $select = $("#DocumentsFile_Cat");
$select.appendTo("#DocumentsFile_Cat");
$.each([data], function(i, optgroups) {
$.each(optgroups, function(groupName, options) {
var $optgroup = $("<optgroup>", {label: groupName});
$optgroup.appendTo($select);
$.each(options, function(j, option) {
var $option = $("<option>", {text: option.text, value: option.value});
$option.appendTo($optgroup);
});
});
});
});
// Lade Daten in die Inputs
$.getJSON('ajax/dokumente_dialogs_formitems.php?item=edit_document&fid='+FileID, function(data){
$('#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_Cat').val(data[0].kid);
$('#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_Name').val(data[0].name);
$('#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_URL').val(data[0].url);
$('#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_Pfad').val(data[0].pfad);
if(data[0].versteckt == 1){
$('#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_Versteckt').prop("checked", true);
}
else{
$('#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_Versteckt').prop("checked", false);
}
$("#DocumentsFileEdit #DocumentsFileForm #DocumentsFile_Cat").selectmenu("refresh"); // 12.04.2016: Macht in jQuery UI 1.11.4 noch Probleme.
});
},
(It's in a dialog function)
Please provide a reduced test case using jsbin. The reduced test case should not use Ajax at all and should be runnable by everyone.