DOM attribute selector is broken on widget event

This's a regression of 61d548d where attribute selector is not properly matched on delegated event, unfortunately the tests has a flaw so that it doesn't reveal the problem at the first place, now corrected with 07eedcc.