fix #11787: document stateful button JS