Vis4Sense / HistoryMap

http://sensemap.io
46 stars 7 forks source link

Duplicate(child) node created. Original and duplicate nodes linked with an Edge #80

Closed HumzahJavid closed 7 years ago

HumzahJavid commented 7 years ago

Generating a tab (node) with the following code on a blank history map should create a single node with Zero edges in addition to the tab opening in the chrome window.

  chrome.tabs.create({ url: manualUrl, active: false }, function(tab) {
            actionTaken = true;
        });

History map and test result

However the result is Two nodes with One edge being created, the number of open tabs is as expected (1). The duplicated node is created as a child node of the original one.

Image of Issue 80 (duplicate node created

JSON structure of nodes

Analysing the JSON structure of the nodes shows a minor difference between the two nodes (under the text field, it could be a symptom of the issue, or a possible cause.

[
  {
    "id": 0,
    "tabId": 134,
    "time": "2017-07-04T15:52:27.122Z",
    "url": "http://www.mdx.ac.uk/",
    "text": "134:http://www.mdx.ac.uk/"
  },
  {
    "id": 1,
    "tabId": 134,
    "time": "2017-07-04T15:52:27.636Z",
    "url": "http://www.mdx.ac.uk/",
    "text": "134:www.mdx.ac.uk",
    "parentTabId": 134,
    "from": 0
  }
]
Original Node Duplicate/child node
"text": "134:http://www.mdx.ac.uk/" "text": "134:www.mdx.ac.uk",

Recreate the error

To recreate it please use the issue80demonstration.html found in the options page.

Branch rebuild-refactor-humzah File path tests\Humzah\issue80Demonstration.html

HumzahJavid commented 7 years ago

Issue resolved

The issue has been solved courtesy an earlier commit by @kaimdx https://github.com/Vis4Sense/SenseMapExtension/tree/46c54fdc4b68655bd21fc16dad82f59847d5eacc

solvedissue