Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.30.0+] Fill handle double-click fills left instead of down #5023

Closed
djcooke opened this issue Apr 11, 2018 · 5 comments
Closed

[0.30.0+] Fill handle double-click fills left instead of down #5023

djcooke opened this issue Apr 11, 2018 · 5 comments
Assignees
Labels
Auto fill Plugin bug Regression Issues that were created while adding new changes to the source code Status: Released

Comments

@djcooke
Copy link

djcooke commented Apr 11, 2018

Description

When you double-click the fill handle for a cell, the value in that cell should be autofilled into all of the cells below it as long as data has been entered in the cell to the left of the one being filled. This works correctly as long as there is at least one applicable cell to fill.

If the column to the left is empty, then double-clicking the fill handle causes the autofill to happen sideways, filling all cells to the left. The same happens if there is data in one cell to the left, but not in any below.

Steps to reproduce

  1. start with a blank Handsontable at least 3x3
  2. enter any value into cell B1 (middle top if the table is 3x3)
  3. double-click the fill-handle for B1. The value will be copied left

Demo

https://jsfiddle.net/6zgv3exz/15/

If you double-click the fill handle on the cell containing '2', the value is autofilled down as expected. If you double-click the fill handle on either of the cells containing '3' or '4', the value is autofilled left instead.

Possible solution

Initializing lastFilledInRowIndex to -1 here probably fixes the problem, which occurs when the following loop has zero iterations.

I have made a different change to my local copy as we wanted the autofill to extend to the bottom of the table regardles of whether there is any data to the left.

Your environment

  • Handsontable version: 0.38.1
  • Browser Name and version: Firefox 59.0.2
  • Operating System: Ubuntu
@AMBudnik
Copy link
Contributor

AMBudnik commented Apr 12, 2018

Thank you for sharing this scenario. The behavior of autofill in inconsistent.

gif

If we get 2 in B1:B3 we should get 3 in D1:D3 instead od C1:D1

Inform Gr# 16479

@AMBudnik
Copy link
Contributor

AMBudnik commented Apr 20, 2018

Here's how the example worked before we made a refactor in v 0.30.0.

22gif
v 0.29.2.. It simply did not do anything for value 3. I will mark it as a regression but maybe we should consider checking if the 3 can act like 2 a populate the value to D2 and D3 cells.

@AMBudnik AMBudnik added the Regression Issues that were created while adding new changes to the source code label Apr 20, 2018
@AMBudnik AMBudnik changed the title Fill handle double-click fills left instead of down [0.30.0+] Fill handle double-click fills left instead of down Apr 20, 2018
@kalugny
Copy link

kalugny commented Apr 23, 2018

I am also suffering from this problem

@wojciechczerniak
Copy link
Contributor

5.0.2-RC: https://jsfiddle.net/rdhktn3f/ 👍

@AMBudnik
Copy link
Contributor

Thank you. Issue solved in v 5.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto fill Plugin bug Regression Issues that were created while adding new changes to the source code Status: Released
Projects
None yet
Development

No branches or pull requests

5 participants