Move button active behaviour into js. r=benfrancis