  Early dark energy (EDE) that becomes subdominant around the epoch of
matter-radiation equality can be used to ease the Hubble tension. However,
there is a theoretical problem that why the energy scale of EDE is in
coincidence with that of matter-radiation equality when their physics are
completely unrelated. Sakstein and Trodden [Phys. Rev. Lett. 124, 161301
(2020)] proposed a mechanism to solve this coincidence problem with
$\mathcal{O}({\rm eV})$-mass neutrino. In this paper, in order to solve the
coincidence problem, we propose a new scenario for EDE, in which the onset and
ending of EDE are triggered by the radiation-matter transition. The specific
example we study is a $k$-essence model. The cosmic evolution equations can be
recast into a two-dimensional dynamical system and its main properties are
analyzed. Our results suggest that $k$-essence seems unable to realize the new
scenario for EDE. However, an EDE model with different scenario is realized in
$k$-essence. In this model, the ending of EDE can be triggered by the
radiation-matter transition while the onset depends on the initial conditions
of the scalar field. Therefore, the obtained model can only be used to solve
half of the coincidence problem. The full resolution in the framework of our
initial proposed scenario is worthy of more research.
