Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

[Timeline regression bug] When setting "editable:true" after initialization, items require double clicking instead of single click #3852

Open
daattali opened this issue Mar 2, 2018 · 3 comments

Comments

@daattali
Copy link
Contributor

daattali commented Mar 2, 2018

In visjs 4.21.0, if you initialize a timeline with no options, and then use timeline.setOptions({editable:true}), then you need to double-click on an item in order to edit it. If the timeline is initialized with editable:true then single click works fine. In version 4.16.1 this bug did not exist.

Minimal reproducible code:

<!DOCTYPE HTML>
<html>
<head>
  <script src="vis-4.21.0/vis.min.js"></script>
  <link href="vis-4.21.0/vis.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="visualization"></div>
<script type="text/javascript">
  var container = document.getElementById('visualization');
  var items = [
    {id: 1, content: 'item 1', start: '2013-04-19'}
  ]
  var timeline = new vis.Timeline(container, items, {});
  timeline.setOptions({editable:true})
</script>
</body>
</html>
@daattali
Copy link
Contributor Author

Any updates on fixing this bug?

@mojoaxel
Copy link
Member

I would consider this a minor bug, but still a bug!
Maybe @yotamberk can have a look?

@daattali You could try this with timeline-plus. Also there the chance of this to get fixed is much greater (sadly)...

@daattali
Copy link
Contributor Author

Thank you, I files an issue there yotamberk/timeline-plus#99 as well :)

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

No branches or pull requests

3 participants