on("keyup paste", function) not updating in Microsoft Edge

on("keyup paste", function) not updating in Microsoft Edge

Hello,

The following js works great. When I type in the first_name and last_name fields, the combined data is copied into the hidden url_title field.

When I update either of these fields, the updated data is also copied into the same url_title field...in every browser except Microsoft Edge.


Any ideas for how I can remedy this would be greatly appreciated!

Thanks!

Peter T



  1.         $(document).ready(function() {
                $("#first_name , #last_name").on("keyup paste", function() {
                    var str=$("#first_name").val() +  '_' +  $("#last_name").val();
                    $("#url_title").val(str);
                });
                $("#first_name, #last_name").change(function() {
                    $("#url_title").val($("#first_name").val() + "_" + $("#last_name").val());
                });
            });