summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorJared Dillard <jared.dillard+github@gmail.com>2016-12-15 11:04:52 -0600
committerGitHub <noreply@github.com>2016-12-15 11:04:52 -0600
commit9d4da801ebd426db89b515a9d12d3eb389898b62 (patch)
treee83c6554663fd9d314943180e738cc4947d076d5 /src/usr/local/www/firewall_rules_edit.php
parent97eebb23531bc95af2cde686641080851107c42c (diff)
downloadpfsense-9d4da801ebd426db89b515a9d12d3eb389898b62.zip
pfsense-9d4da801ebd426db89b515a9d12d3eb389898b62.tar.gz
Fix the Safari issue mentioned by @garga
https://github.com/pfsense/pfsense/pull/3139#pullrequestreview-156718 I ended up having to remove the select element and re-create it (along with the options) in order to get around what appears to be a bug in Safari.
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index e51fed3..e6f296a 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1897,10 +1897,16 @@ events.push(function() {
var current_sel = ($(listid).val() || ['any']); // Ensures we get correct array when none selected
var new_options = icmptypes[$('#ipprotocol').val()];
var new_html = '';
+ //remove and re-create the select element (otherwise the options can disappear in Safari)
+ $(listid).remove();
+ var select = $("<select></select>").attr("id", "icmptype[]").attr("name", "icmptype[]").addClass("form-control").attr("multiple", "multiple");
+ $('div.icmptype_section > div.col-sm-10').prepend(select);
+
for (var key in new_options) {
new_html += '<option value="' + key + (jQuery.inArray(key, current_sel) != -1 ? '" selected="selected">' : '">') + new_options[key] + '</option>\n';
}
- $(listid).empty().html(new_html);
+
+ $(listid).html(new_html);
ext_change();
OpenPOWER on IntegriCloud