0

I'm trying to set up automatically focus on first loaded article. (f.e. user clicks on the button "load more" and new articles are loaded).

My react implementation:

I'm using ref attribute in <Link> component, which is from react-router library and then I'm calling focus() method in lifecycle method componentDidMount().

It works on all devices except iOS. If I turn on voiceover on iphone and then on webpage I click on the button, it doesn't automatically focus on first loaded article). It works just with html anchor tag.

I read some articles before and it looks that it's not possible to do this in this way but only with firing some event f.e. click event.

Can someone confirm that it's not possible to solve it in this way or there is any workaround without using jquery ?

Morten
  • 133
  • 4
  • 15

0 Answers0