The temporal and spatiotemporal linear stability analyses of a displaced Oldroyd-B fluid with the mean flow in a horizontally aligned, square, Hele–Shaw cell are reported to identify the regions of topological transition of the advancing interface. The viscosity of the displacing fluid is negligible in comparison to the displaced fluid. While all the inertial terms in the model are retained, the interface is assumed to evolve on a slow timescale compared with the timescale of the perturbation (or the so-called “quasi-stationary” approximation). The parameters governing stability are the Reynolds number Re=b2ρU012η2L, the elasticity number E=12λ(1−ν)η2ρb2, and the ratio of the solvent to the polymer solution viscosity ν=ηsη2, where b,L,U0,ρ,λ are the cell gap, the cell length (or width), the mean flow velocity, the density of the driven fluid, and the polymer relaxation time, respectively. Reasonably good agreement on the relative finger width data computed with our model and the experimental data in the Stokes and the inertial Newtonian regime is found. In the asymptotic limit E(1−ν)≪1, the critical Reynolds number, Rec, diverges as Rec∼[E(1−ν)]−5/3 and the critical wavenumber, αc, increases as αc∼[E(1−ν)]−2/3. In a confined domain, the temporal stability analysis indicates (a) the destabilizing influence of the inertial terms, (b) the destabilizing impact of the finite boundaries near the wall, and (c) the stabilizing impact of elasticity until a critical Reynolds number. The Briggs idea of analytic continuation is deployed to classify regions of absolute and convective instabilities as well as the evanescent modes. The phase diagram reveals the presence of an absolutely unstable region at high values of Reynolds and elasticity number, confirming the role of fluid inertia in triggering a pinch-off.