Changeset 7814


Ignore:
Timestamp:
May 28, 2020, 9:28:30 AM (19 months ago)
Author:
Nicklas Nordborg
Message:

Fixes #2212: Annoying scrolling in "Edit annotations" dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.16-stable/www/common/annotations/annotate.js

    r7429 r7814  
    128128    if (annotationId)
    129129    {
    130       annotate.selectAnnotation(annotationTypeId+'-'+annotationId);
     130      annotate.selectAnnotation(annotationTypeId+'-'+annotationId, true);
    131131    }
    132132    else if (annotationTypeId)
    133133    {
    134       annotate.selectAnnotation(annotationTypeId)
     134      annotate.selectAnnotation(annotationTypeId, true);
    135135    }
    136136    else
     
    270270    and populate the input fields with the current value(s).
    271271  */
    272   annotate.selectAnnotation = function(entryId)
     272  annotate.selectAnnotation = function(entryId, scrollIntoView)
    273273  {
    274274    if (selectedAnnotation)
     
    305305        annotate.categoryOnChange();
    306306      }
    307       Doc.element(entryId).scrollIntoView(false);
     307      if (scrollIntoView) Doc.element(entryId).scrollIntoView({block: 'center'});
    308308     
    309309      var at = selectedAnnotation.annotationType;
Note: See TracChangeset for help on using the changeset viewer.