Not all browsers support the same copy and paste capabilities. Here is the diagram in which the browser is supported:
http://www.quirksmode.org/dom/events/cutcopypaste.html
If the browser supports capturing copy / paste events, jQuery should work fine. I would suggest checking each of your target browsers.
Another approach would be to use the jQuery data property to detect input field changes. Here is an article with sample code:
http://www.mydogboris.com/2009/10/using-jquery-data-feature-to-detect-form-changes/
from the article:
var formChanged = false; $(document).ready(function() { $('#my_form input[type=text].editable, #my_form textarea.editable').each(function (i) { $(this).data('initial_value', $(this).val()); }); $('#my_form input[type=text].editable, #my_form textarea.editable').keyup(function() { if ($(this).val() != $(this).data('initial_value')) { handleFormChanged(); } }); $('#my_form .editable').bind('change paste', function() { handleFormChanged(); }); $('.navigation_link').bind("click", function () { return confirmNavigation(); }); }); function handleFormChanged() { $('#save_or_update').attr("disabled", false); formChanged = true; } function confirmNavigation() { if (formChanged) { return confirm('Are you sure? Your changes will be lost!'); } else { return true; } }
source share