Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-1350

When Spreadsheet gets the focus, it scroll the whole page up

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.9.2
    • Fix Version/s: 3.9.5
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      Sprint 8

      Description

      Steps to Reproduce

      1. load t5183.zul
      a big block area on top of a spreadsheet and produces vertical scrollbar.
      2. scroll down the whole page to see the complete spreadsheet
      3. click a cell

      alternative Steps to Reproduce

      1. load t5183.zul
      2. scroll down the whole page to see the complete spreadsheet
      3. click A1
      4. do step 2 again
      5. double click A2

      Current Result

      the browser scrolls up the whole page to the top

      Expected Result

      no scroll up

      root cause

      selectFocustag: function () {
          ....
          inlineEditor.getInputNode().focus();
      }
      

      inlineEditor.getInputNode() is always on the left-top corner of the page, so focus it will scroll the whole page up.

      Solution

      remove focus(). Since select the whole text already can allow direct edit without entering edit mode.

      Workaround

      zss-1350.js

        Attachments

        1. t5183.zul
          0.3 kB
        2. zss-1350.js
          0.4 kB

          Issue Links

            Activity

              People

              • Assignee:
                hawk hawk
                Reporter:
                hawk hawk
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: