Use selectedIndex instead of value for tracking change events.

Fixes #1024 and #962