Merged from master: onActiveChanged event