From 1e595850d3f83393b1fe10eb0aeccfb5e27648c3 Mon Sep 17 00:00:00 2001 From: Andrew Hayes Date: Wed, 1 Mar 2017 22:46:23 +0000 Subject: [PATCH] Fixing JS admin widget to properly update the field value when copy/paste/cut/undo events occur in any text-input, in addition to manually typing (keyup events etc.) --- django_hstore/static/admin/js/django_hstore/hstore-widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_hstore/static/admin/js/django_hstore/hstore-widget.js b/django_hstore/static/admin/js/django_hstore/hstore-widget.js index 64894a7..d6acb29 100644 --- a/django_hstore/static/admin/js/django_hstore/hstore-widget.js +++ b/django_hstore/static/admin/js/django_hstore/hstore-widget.js @@ -163,7 +163,7 @@ var initDjangoHStoreWidget = function(hstore_field_name, inline_prefix) { }); // update textarea whenever a field changes - $hstore.delegate('input[type=text]', 'keyup', function() { + $hstore.delegate('input[type=text]', 'input propertychange', function() { updateTextarea($hstore); }); };