mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
Firewall: Aliases - fix unexpected side-affect of 902487aecc, closes https://github.com/opnsense/core/issues/7614
It looks like the content selector to hook the tokenizer events was too wide, which started to cause issues after we added the live search.
This commit only targets the change events on the select itself prevent double execution and possible non string items to be forwarded to `tokenize2().trigger('tokenize:tokens:add',...)`
This commit is contained in:
parent
073715d990
commit
4569d045cc
@ -252,12 +252,12 @@
|
||||
});
|
||||
|
||||
$(".geoip_select").selectpicker();
|
||||
$(".geoip_select").change(function(){
|
||||
$("select.geoip_select").change(function(){
|
||||
// unlink on change event
|
||||
$("#alias\\.content").unbind('tokenize:tokens:change');
|
||||
// copy items from geoip fields to content field
|
||||
$("#alias\\.content").tokenize2().trigger('tokenize:clear');
|
||||
$(".geoip_select").each(function () {
|
||||
$("select.geoip_select").each(function () {
|
||||
$.each($(this).val(), function(key, item){
|
||||
$("#alias\\.content").tokenize2().trigger('tokenize:tokens:add', item);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user