Skip to content

Commit

Permalink
Merge pull request #8 from varaisys/apply-edit-mode-changes
Browse files Browse the repository at this point in the history
retain changes in keep alive edit mode on refresh
  • Loading branch information
dermasmid authored Jan 13, 2023
2 parents 221c1e0 + 89188b0 commit d1e9303
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jsoneditor/jsoneditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ def wsgi_app(self, environ, respond):
callback_data = json.loads(
environ["wsgi.input"].read(request_body_size).decode("utf-8")
)["data"]
# fix for edit mode with keep alive setting
# apply the recieved data to instance data
# without this a refresh doesn't reflect saved changes
self.data = callback_data
self.callback(callback_data)
self.send_response("200 OK", "text/plain", respond)
yield b""
Expand Down

0 comments on commit d1e9303

Please sign in to comment.