Skip to content

Commit

Permalink
Reset project settings form after it loads
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Atkins-Turkish committed Jan 26, 2016
1 parent b90346a commit 50ae402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ide/static/ide/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ CloudPebble.Settings = (function() {
uuid_field.trigger("change");
});

// Resetting the form ensures that the values are correctly set when Chrome restores the page after quitting the browser
pane.find('form')[0].reset();

live_form.init();

CloudPebble.Sidebar.SetActivePane(pane, 'settings');
Expand Down
2 changes: 1 addition & 1 deletion ide/templates/ide/project/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="control-group">
<label class="control-label" for="settings-name">{% trans 'Project name' %}</label>
<div class="controls">
<input type="text" id="settings-name">
<input type="text" id="settings-name" value="{{ project.name }}">
</div>
</div>
<div class="sdk-version native-only control-group">
Expand Down

0 comments on commit 50ae402

Please sign in to comment.