Fix commit on enter for resource widget

When changing a resource and committing by hitting enter, the old
value was used, not the one that was actually in the input box.