Ok, I have noticed a difference between the two cases (when the value is correctly passed vs. when the value is cleared):
The production.log looks like this when it the value is correctly passed on to the AE:
[----] I, [2017-05-25T16:28:24.742730 #3234:12e42ac] INFO -- : Processing by CatalogController#dialog_field_changed as JS
[----] I, [2017-05-25T16:28:24.742853 #3234:12e42ac] INFO -- : Parameters: {"service_name"=>"csut53", "id"=>"39000000000003"}
[----] I, [2017-05-25T16:28:24.881861 #3234:12e42ac] INFO -- : Completed 200 OK in 139ms (Views: 0.9ms | ActiveRecord: 0.0ms)
[----] I, [2017-05-25T16:28:25.331021 #3234:12e8f00] INFO -- : Started POST "/catalog/dialog_field_changed/39000000000003?wp_header=header2.jpg" for 127.0.0.1 at 2017-05-25 16:28:25 +0200
[----] I, [2017-05-25T16:28:25.333080 #3234:12e8f00] INFO -- : Processing by CatalogController#dialog_field_changed as JS
[----] I, [2017-05-25T16:28:25.333233 #3234:12e8f00] INFO -- : Parameters: {"wp_header"=>"header2.jpg", "id"=>"39000000000003"}
[----] I, [2017-05-25T16:28:25.464669 #3234:12e8f00] INFO -- : Completed 200 OK in 131ms (Views: 0.8ms | ActiveRecord: 0.0ms)
However, the value is cleared if the processing of two input changes overlaps in time:
[----] I, [2017-05-25T16:31:36.659017 #3234:12e42ac] INFO -- : Started POST "/catalog/dialog_field_changed/39000000000003" for 127.0.0.1 at 2017-05-25 16:31:
36 +0200
[----] I, [2017-05-25T16:31:36.662529 #3234:12e42ac] INFO -- : Processing by CatalogController#dialog_field_changed as JS
[----] I, [2017-05-25T16:31:36.662643 #3234:12e42ac] INFO -- : Parameters: {"service_name"=>"csut55", "id"=>"39000000000003"}
[----] I, [2017-05-25T16:31:36.692244 #3234:12e8f00] INFO -- : Started POST "/catalog/dialog_field_changed/39000000000003" for 127.0.0.1 at 2017-05-25 16:31:
36 +0200
[----] I, [2017-05-25T16:31:36.697534 #3234:12e8f00] INFO -- : Processing by CatalogController#dialog_field_changed as JS
[----] I, [2017-05-25T16:31:36.697681 #3234:12e8f00] INFO -- : Parameters: {"frontend"=>"windows", "authenticity_token"=>"KXBQ/b4TDeSyGYa7NSKlrpaVTp7ptY1i0
Bc2VrTw15m1ueX+73HqVABvGuzphHWXteDO6brDiGj8SZAZZin7ow==", "id"=>"39000000000003"}
[----] I, [2017-05-25T16:31:36.871109 #3234:12e42ac] INFO -- : Completed 200 OK in 208ms (Views: 1.0ms | ActiveRecord: 0.0ms)
[----] I, [2017-05-25T16:31:36.953501 #3234:12e8f00] INFO -- : Completed 200 OK in 256ms (Views: 1.1ms | ActiveRecord: 0.0ms)
So this is a bug in how the dialog fields are processed in CatalogController#dialog_field_changed. There is a race condition when two changes arrive simultaneously.