Immigration was absolutely the driving issue, though the immigrants in question tended to be white people from eastern/central Europe (anti-Polish sentiment, which seems risible to us, is rampant in some quarters in the UK).