g_form.showFieldMsg is not setting focus to the Additional Comments box in Helsinki. By using the below function (eg on a Incident form):
g_form.showFieldMsg('comments','No Focus on Comments box','error',true);

The Comments field should get the focus, which instead seems to be placed on top of the page.
The fourth parameter (true) is actually the [code]<strong>scrollForm</strong>[/code] option and, when set to true, should get focus to the field where the showFieldMsg function is applying (Comments in this case). The issue does not occur on other fields like Short Description or reference fields.


Steps to Reproduce


1 - Run the below function somewhere in a task form:
 g_form.showFieldMsg('comments','No Focus on Comments box','error',true);
2 - Import the attached UI Action code (a button named "test INT3033882" in the Incident form).
3 - Scroll the page in order not to have the comments shown on the screen. Notice the focus will be placed on top of the page.

Try running the same function for short_description instead of comments to observe the correct behaviour.


Helsinki has resolved the related problem PRB657182 - g_form.showFieldMsg does not work with the Activity Formatter in UI16.

The below function has been provided as workaround for the focus issue (using that function you would have to set the scrollForm option of g_form.showFieldMsg to false ):

function getFocusToComments(){
	var com = gel("activity-stream-textarea");
	if (com){
	com = gel("activity-stream-comments-textarea");
	if (com)

Related Problem: PRB712506

Seen In

Helsinki Patch 3 Hot Fix 2

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:36:18