Fix #2840 - textfield binding issue with null

Here is a fix for issue #2840 that I raised.  The issue seems to stem from the way jQuery handles "attributes" vs "properties".  This feels very quirky.