Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JET 4.1 autofocus input-text on FF

Andrew BennettJan 19 2018 — edited Jan 19 2018

Looking to use the autofocus attribute on the input text component http://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojInputText.html#autofocus

This works fine on Chrome / IE, but on Firefox (Using 57.0.4 (64-bit)) this doesn't set the input text to be in focus.

I have tried the following but still can't get it to work across all browsers, has anyone managed to do this in 4.1?

  • autofocus attribute in the HTML
  • In bindings applied function doing document.getEle...()    elem.autofocus = true
  • var elem = document.getElementById('username-input');  elem.focus()
  • var elem = document.getElementById('username-input|input');  elem.focus()
  • Busy context check with all of the above applied

The only thing I can do to get to work is adding a setTimeout in the bindings applied function, and then doing var elem = document.getElementById('username-input|input');  elem.focus() which isn't ideal

Cheers,

Andy

This post has been answered by Andrew Bennett on Jan 19 2018
Jump to Answer
Comments
Post Details
Added on Jan 19 2018
1 comment
471 views