Fixed IE incompatible code in TemplatedWidget

Change-Id: Ieedbdcb182cf119c560b67aa372408e814ef95ef
Merge "Fixed IE incompatible code in TemplatedWidget"