Prevent scrolling when pasting data in FlexSheet

Posted by: holly.anderson on 13 November 2017, 7:52 am EST

    • Post Options:
    • Link

    Posted 13 November 2017, 7:52 am EST

    Hello,

    I’ve noticed some interesting behavior when I paste large amounts of data in a FlexSheet. If I copy 50 rows (one column) from an external excel spreadsheet and paste it into a column in a FlexSheet control where only 10 rows are visible at a time, then the FlexSheet will scroll down to the bottom of the pasted range after the paste operation is complete. If I copy 50 rows from one column within the FlexSheet and paste the data in another column, the FlexSheet control does not scroll down after the paste operation is complete.

    I prefer the latter behavior (no scrolling), especially because when pasting external data in a FlexSheet in IE, the FlexSheet appears to scroll as the data is being pasted, and it can look very choppy. Is there any way to prevent the FlexSheet from scrolling when pasting data from an external source?

    Thanks,

    Holly

  • Posted 13 November 2017, 8:46 pm EST

    Hi Holly,

    We are unable to replicate the issue with latest pre release build 5.20173.380 which is expected to be released this week.

    You can get pre release build for testing purpose:

    http://prerelease.componentone.com/wijmo5/

    ~Manish

  • Posted 13 November 2017, 11:54 pm EST

    Please see the attached sample and follow these steps to replicate the issue. I’m wondering if there’s any way to prevent the FlexSheet from scrolling in Scenario 1.

    Scenario 1

    1. From an external excel file, copy 50 rows (1 column) of data.
    2. Single click on the first cell in the Name column.
    3. Paste the copied content using Ctrl+v.

    Results: The data is pasted and the FlexSheet control scrolls to the bottom of the pasted content.

    Scenario 2

    1. Single click on the ID column header.
    2. Copy the column using Ctrl+c.
    3. Single click on the first cell in the Name column.
    4. Paste the copied content using Ctrl+v.

    Results: The data is pasted and the scroll position of the FlexSheet does not change.

    FlexSheetDemo_Paste.zip

  • Posted 14 November 2017, 5:14 pm EST

    Hi Holly,

    We can observe that the reason behind this is allowAddNew property set to true for my sample I have tested yesterday.

    If you will set allowAddNew property to true, the scrolling will not be occurred.

    We can also observed that the scrolling in IE is a little slower than the chrome.

    ~Manish

  • Posted 14 November 2017, 11:46 pm EST

    Hi Manish,

    If I set allowAddNew to true, I still see the same behavior. The sample I provided has 50 rows by default. If you copy exactly 50 rows (1 column) of data from an external excel sheet, single click in the first cell in the Name column, and press Ctrl+v, the copied data will be pasted and the FlexSheet will scroll to the bottom.

    This behavior seems to be coming from the following line in the CollectionView.prototype.editItem function in wijmo.js:

    if (item != this._edtItem && this.moveCurrentTo(item))
    

    If I take out this.moveCurrentTo(item), then the FlexSheet does not scroll when the paste operation completes.

    I’m assuming this behavior isn’t configurable using FlexSheet’s properties, so would it be possible to put in an enhancement request to either take out this behavior or make it optional? I’m trying to look for ways to improve performance in IE, and I think this could make a difference.

    Thanks,

    Holly

  • Posted 15 November 2017, 7:51 pm EST

    Hi Holly,

    We are able to replicate with allowAddNew property too. Thanks for pointing towards this point. We have forwarded to the concerned team for further investigation with tracking id 297615.

    We will let you know as soon as we get update.

    ~Manish

  • Posted 5 January 2018, 10:51 pm EST

    Hi,

    This issue has been found fixed with pre-release build version 5.20173.400. If you would like to verify the issue, you may download the pre-release build for testing purpose.

    http://prerelease.componentone.com/wijmo5/

    This build is not recommended to use for production since this is under QA process for next release.

    ~Manish

  • Posted 8 January 2018, 1:10 am EST

    Hi Manish,

    I just tested in IE with the latest pre-release build. The scroll position does indeed return to the top of the spreadsheet after the paste operation is complete, but the spreadsheet still appears to scroll through the rows when pasting the data.

    As stated in my original post, when pasting external data in a FlexSheet in IE, the FlexSheet appears to scroll as the data is being pasted, and it can look very choppy. This is arguably the larger problem, so is there any way to prevent the FlexSheet from scrolling while pasting data from an external source? For more information, please refer to my previous post where I discuss the code which I believe to be causing the issue.

    Thanks,

    Holly

  • Posted 8 January 2018, 5:08 pm EST

    Hi Holly,

    I give a test again today with 5.20173.401 and IE version 11.98.16299.0 and do not see any scroll with same steps provided by you:

    ~Manish

  • Posted 9 January 2018, 12:07 am EST

    Hi Manish,

    That’s odd. I retested the original sample I provided in IE 11.0.9600.18893 with Wijmo 5.20173.402. I attached a video which shows that the spreadsheet scrolls while pasting data that is copied from an external source. Do you have the ability to test in the version of IE that I have? I’m on Windows 7, if that makes a difference.

    Holly

    FlexSheetDemo_Paste_Video.zip

  • Posted 9 January 2018, 10:28 pm EST

    HI Holly,

    It’s strange. The issue can not be replicated on Window 8,10 machine. But it can be reproduce with Window 7 and IE 11.0.9600.17843.

    We have reported back to the concerned team for further investigation.

    We will let you know as we get any update on this.

    ~Manish

  • Posted 25 January 2018, 11:28 pm EST

    Is there any update on this?

  • Posted 29 January 2018, 6:04 pm EST

    Hi Holly,

    We are sorry for the delay.

    This issue is still with the team.

    ~Manish

  • Posted 27 February 2018, 1:47 am EST

    Is there any update on this? It seems like the initial issue may have been fixed in the latest build. When pasting in IE, the FlexSheet no longer scrolls as the data is being pasted. But now when the paste operation has completed, the FlexSheet is scrolled to the bottom of the pasted data/area. This happens in other browsers as well (e.g. Chrome). This wasn’t happening in prior builds, and this behavior does not match Excel. Was this change intentional?

  • Posted 27 February 2018, 4:26 pm EST

    Hi Holly,

    The scrolling occur with IE(11.0.9600.18893) too. Hence, we have queried to the development team to confirm if this is by design now.

    We will let you know as we get any update on this.

    ~Manish

  • Posted 4 March 2018, 11:58 pm EST

    Any update?

  • Posted 5 March 2018, 9:07 pm EST

    Holly,

    I am really sorry about the delay. Our Dev Team is still investigating this. I have asked them to prioritize the case. I will update you on this soon.

  • Posted 6 March 2018, 9:48 pm EST

    Hi,

    Case 297615 has been fixed in the latest pre-release. Could you please check this and let me know if it works for you.

  • Posted 7 March 2018, 11:49 pm EST

    Yes, this issue appears to be fixed in build 5.20173.431. Thanks!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels