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

Drag-Down not working if DIV is in a table (IE9, Chrome) #438

Closed
oceanice opened this issue Feb 23, 2013 · 4 comments
Closed

Drag-Down not working if DIV is in a table (IE9, Chrome) #438

oceanice opened this issue Feb 23, 2013 · 4 comments
Labels

Comments

@oceanice
Copy link

If your display DIV is contained in a TABLE cell then the drag down feature does not seem to work

eg

<html>
<head>
  <script src="../lib/jquery.min.js"></script>
  <script src="../dist/jquery.handsontable.full.js"></script>
  <link rel="stylesheet" media="screen" href="../dist/jquery.handsontable.full.css">
</head>

<body>

<table>
<tr>
   <td><div id="dataTable"></div></td>
</tr>
</table>

<script>
  $("#dataTable").handsontable({
    startRows: 8,
    startCols: 5,
    rowHeaders: true,
    colHeaders: true,
    minSpareRows: 1,
    fillHandle: true //possible values: true, false, "horizontal", "vertical"
  });

  var data = [
    ["", "Kia", "Nissan", "Toyota", "Honda"],
    ["2008", 10, 11, 12, 13],
    ["2009", 20, 11, 14, 13],
    ["2010", 30, 15, 12, 13],
    ["2011", "", "", "", ""],
    ["2012", "", "", "", ""]
  ];

  $("#dataTable").handsontable("loadData", data);
</script>

</body>
</html>

If I take the div out of the table then it works

<html>
<head>
  <script src="../lib/jquery.min.js"></script>
  <script src="../dist/jquery.handsontable.full.js"></script>
  <link rel="stylesheet" media="screen" href="../dist/jquery.handsontable.full.css">
</head>

<body>

<div id="dataTable"></div>

<script>
  $("#dataTable").handsontable({
    startRows: 8,
    startCols: 5,
    rowHeaders: true,
    colHeaders: true,
    minSpareRows: 1,
    fillHandle: true //possible values: true, false, "horizontal", "vertical"
  });

  var data = [
    ["", "Kia", "Nissan", "Toyota", "Honda"],
    ["2008", 10, 11, 12, 13],
    ["2009", 20, 11, 14, 13],
    ["2010", 30, 15, 12, 13],
    ["2011", "", "", "", ""],
    ["2012", "", "", "", ""]
  ];

  $("#dataTable").handsontable("loadData", data);
</script>

</body>
</html>
@bpohoriletz
Copy link

@setthase
Copy link

Duplicate of #355

@setthase
Copy link

We have a new policy of closing duplicate tickets. Thanks for your input, please follow original #355 for this issue.

warpech added a commit that referenced this issue Jun 18, 2013
…#361, #538, #438, #671, #704) - this makes me realize how many people still use tables to create a layout
@setthase
Copy link

This should be fixed in new version of HOT (0.9.6). Thanks for your report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants