code: protected void detectOutOfScopeElement(Element element, Functions.Func callback) {
          if (scrollHelper.isInViewPort(element)) {
              callback.call();
          } else {
              scrollHelper.setOffsetPosition(OffsetPosition.MIDDLE);
              scrollHelper.setCompleteCallback(() -> callback.call());
              scrollHelper.scrollTo(element);
          }
      }
docs: Will detect if the target / source element is out of scope in the viewport.
  If it is then we will call {@link ScrollHelper#scrollTo(double)} with default offset position
  of {@link OffsetPosition#MIDDLE}.