Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-13546

livesearch macro steals focus after page loads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 2.9.2
    • None

    Description

      When the livesearch macro is used on a page, atlassian-effects.js kicks in places focus on this input field.

      This is not desirable and often steals focus from an element that user selected before the page finished loading, which results in bad user experience.

      Here is a patch for the issue that we use, it's pretty lame, but with the current atlassian-effects.js code I don't think that there is a better solution.

      diff --git a/apps/confluence/confluence-project/conf-webapp/src/main/webapp/includes/js/effects.js b/apps/confluence/confluence-project/conf-webapp/src/main/webapp/includes/js/effects.js
      --- a/apps/confluence/confluence-project/conf-webapp/src/main/webapp/includes/js/effects.js
      +++ b/apps/confluence/confluence-project/conf-webapp/src/main/webapp/includes/js/effects.js
      @@ -49,7 +49,7 @@ function placeFocus()
           for (var i = 0; i < document.forms.length; i++)
           {   
               var currSet = document.forms[i].elements;
      -        if (document.forms[i].id != 'quick-search' && document.forms[i].name != 'inlinecommentform')
      +        if (document.forms[i].id != 'quick-search' && !document.forms[i].id.match(/^livesearchform/) && document.forms[i].name != 'inlinecommentform')
               {   
                   for (var j = 0; j < currSet.length; j++)
                   {
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              15d9a6950818 Igor Minar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: