fix file attachment widget render issue (Re #964)