$.focus() not working

后端 未结 14 1166
走了就别回头了
走了就别回头了 2020-11-27 02:48

The last example of jQuery\'s focus() documentation states

$(\'#id\').focus()

should make the input focused (active). I can\'t seem to get

14条回答
  •  死守一世寂寞
    2020-11-27 03:13

    ADDITIONAL SOLUTION Had same issue where focus() didn't seem to work but eventually it turned out that what was needed was scrolling to the correct position:

    • https://stackoverflow.com/a/43342974/1335717

提交回复
热议问题