solid-ui icon indicating copy to clipboard operation
solid-ui copied to clipboard

Double click on checkbox breaks it.

Open timbl opened this issue 6 years ago • 3 comments

timbl avatar Sep 23 '19 22:09 timbl

The problem seems to be that while checkboxes work fine if you click on them slowly if you double click you get a clash from the boxhandler running at the same time as itself.

Console log:

  Deleting  <https://timbl.com/timbl/Automation/mother/state.n3#Iss1567630637012> <http://www.w3.org/2005/01/wf/flow#urgent> "1"^^<http://www.w3.org/2001/XMLSchema#boolean> .
mashlib.js:97663   Inserting <https://timbl.com/timbl/Automation/mother/state.n3#Iss1567630637012> <http://www.w3.org/2005/01/wf/flow#urgent> "0"^^<http://www.w3.org/2001/XMLSchema#boolean> .
mashlib.js:65853 upstream count up to : 1
mashlib.js:65420 UpdateManager: sending update to <https://timbl.com/timbl/Automation/mother/state.n3>
mashlib.js:56043  setCredentials: https://timbl.com/timbl/Automation/mother/state.n3 starts as: undefined
mashlib.js:56051    setCredentials: https://timbl.com/timbl/Automation/mother/state.n3 ends as: include
mashlib.js:65705 just an echo: 0
mashlib.js:65439 UpdateManager: update Ok for <https://timbl.com/timbl/Automation/mother/state.n3>
mashlib.js:65858     UpdateManager: Return success 200 elapsed 1364ms
mashlib.js:97662   Deleting  <https://timbl.com/timbl/Automation/mother/state.n3#Iss1567630637012> <http://www.w3.org/2005/01/wf/flow#urgent> "0"^^<http://www.w3.org/2001/XMLSchema#boolean> .
mashlib.js:97663   Inserting <https://timbl.com/timbl/Automation/mother/state.n3#Iss1567630637012> <http://www.w3.org/2005/01/wf/flow#urgent> "1"^^<http://www.w3.org/2001/XMLSchema#boolean> .
mashlib.js:65853 upstream count up to : 1
mashlib.js:65420 UpdateManager: sending update to <https://timbl.com/timbl/Automation/mother/state.n3>
mashlib.js:56043  setCredentials: https://timbl.com/timbl/Automation/mother/state.n3 starts as: undefined
mashlib.js:56051    setCredentials: https://timbl.com/timbl/Automation/mother/state.n3 ends as: include
mashlib.js:97662   Deleting  <https://timbl.com/timbl/Automation/mother/state.n3#Iss1567630637012> <http://www.w3.org/2005/01/wf/flow#urgent> "0"^^<http://www.w3.org/2001/XMLSchema#boolean> .
mashlib.js:97663   Inserting <https://timbl.com/timbl/Automation/mother/state.n3#Iss1567630637012> <http://www.w3.org/2005/01/wf/flow#urgent> "1"^^<http://www.w3.org/2001/XMLSchema#boolean> .
mashlib.js:65853 upstream count up to : 2

timbl avatar Sep 23 '19 22:09 timbl

Then you get an error in the UI Checkbox: Error updating store from true to true: Web error: 409 (Conflict) on PATCH of <https:/... and more console log:

UpdateManager: sending update to <https://timbl.com/timbl/Automation/mother/state.n3>
mashlib.js:56043  setCredentials: https://timbl.com/timbl/Automation/mother/state.n3 starts as: undefined
mashlib.js:56051    setCredentials: https://timbl.com/timbl/Automation/mother/state.n3 ends as: include
mashlib.js:65705 just an echo: 1
mashlib.js:65439 UpdateManager: update Ok for <https://timbl.com/timbl/Automation/mother/state.n3>
mashlib.js:65858     UpdateManager: Return success 200 elapsed 1342ms
mashlib.js:73811 PATCH https://timbl.com/timbl/Automation/mother/state.n3 409 (Conflict)
fetchWithCredentials @ mashlib.js:73811
async function (async)
fetchWithCredentials @ mashlib.js:73802
authnFetch @ mashlib.js:73168
async function (async)
authnFetch @ mashlib.js:73160
fetch @ mashlib.js:72577
(anonymous) @ mashlib.js:56671
webOperation @ mashlib.js:56670
(anonymous) @ mashlib.js:65428
Promise.then (async)
fire @ mashlib.js:65416
update @ mashlib.js:65856
boxHandler @ mashlib.js:97664
mashlib.js:65858     UpdateManager: Return FAILURE undefined elapsed 2041ms

timbl avatar Sep 23 '19 22:09 timbl

Solution seems to protect the boxhandler from running at the same time as itself.

timbl avatar Sep 23 '19 22:09 timbl