How do i find out which GWT element has focus?

后端 未结 4 588
深忆病人
深忆病人 2021-01-13 07:58

I would like to find out, in GWT, which element currently has focus. Basically i was working on virtual keyboard in our application. All keys are working fine except tab key

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-13 09:02

    We can now use the Elemental library to accomplish this.

    http://www.gwtproject.org/articles/elemental.html

    the exact function would be

    elemental.client.Browser.getDocument().getActiveElement()
    

提交回复
热议问题