mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
Fix dropdown delegating and some UI problems (#34014)
The old logic is incomplete. See the comment for the improved logic. Fix #34011 And more fixes: 1. use empty "alt" for images, otherwise the width is not right when the image fails to load 2. remove the "dropdown icon" patch, because it has been clearly done in "dropdown.js" now 3. remove the "dropdown filtered item" patch, added a clear callback, and improve the logic 4. fix global init when a node is removed and added back gain (eg: the "cherry pick" dialog with a dropdown)
This commit is contained in:
@ -752,6 +752,7 @@ $.fn.dropdown = function(parameters) {
|
||||
if(module.is.searchSelection() && module.can.show() && module.is.focusedOnSearch() ) {
|
||||
module.show();
|
||||
}
|
||||
settings.onAfterFiltered.call(element); // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
}
|
||||
;
|
||||
if(settings.useLabels && module.has.maxSelections()) {
|
||||
@ -3992,6 +3993,8 @@ $.fn.dropdown.settings = {
|
||||
onShow : function(){},
|
||||
onHide : function(){},
|
||||
|
||||
onAfterFiltered: function(){}, // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
|
||||
/* Component */
|
||||
name : 'Dropdown',
|
||||
namespace : 'dropdown',
|
||||
|
Reference in New Issue
Block a user