Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3184

ScrollIntoView does not apply recursively

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.2
    • 7.0.7, 8.0.1.1
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.2 S2
    • None

      widget.scrollIntoView (zjq.prototype.scrollIntoView) call if (!this.isScrollIntoView()) to check if the target is currently visible.
      However, this check only goes up the dom tree until the first ascendant holding a style overflow:auto (or similar).

      In a scenario with nested scrollable container, only the first ascendant will be scrolled.
      This also cause non-scrollable containers holding a style overflow:auto such as grid-body to interupt this search and prevent scroll intro view.

      It would be great to have Clients.scrollIntoView(Component, Boolean recursive [default true]) and widget.scrollintoView(Boolean recursive)

      possible workaround:
      use [recursive]true as (!this.isScrollIntoView(true)) in zjq.prototype.scrollIntoView.

        1. gridInDiv.zul
          2 kB
          MDuchemin
        2. scrollIntoView.js
          4 kB
          MDuchemin

            SEFI SEFI
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h