Skip to content
Snippets Groups Projects
Unverified Commit 636ce3b7 authored by hamzamunir7300's avatar hamzamunir7300 Committed by GitHub
Browse files

Merge pull request #18883 from edx/LEARNER-3832

Account Page refreshes on autosave/combobox Language value change
parents a5319535 97106e78
No related branches found
No related tags found
No related merge requests found
......@@ -168,7 +168,8 @@
{platform_name: platformName}
),
options: fieldsData.language.options,
persistChanges: true
persistChanges: true,
focusNextID: '#u-field-select-country',
})
},
countryFieldView,
......@@ -388,7 +389,12 @@
});
accountSettingsView.render();
if( $.cookie('focus_id')) {
$($.cookie('focus_id')).attr({"tabindex": 0});
$($.cookie('focus_id')).focus();
// Deleting the cookie
document.cookie = "focus_id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/account;";
}
showAccountSettingsPage = function() {
// Record that the account settings page was viewed.
Logger.log('edx.user.settings.viewed', {
......
......@@ -143,6 +143,9 @@
this.showNotificationMessage(successMessage);
if (this.options.refreshPageOnSave) {
if ("focusNextID" in this.options) {
$.cookie('focus_id', this.options.focusNextID );
}
location.reload(true);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment