mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 10:54:11 -04:00
Revert "Merge pull request #2855 from alphagov/revert-2843-stop-sticky-overlapping-focus"
This reverts commit0f9969989a, reversing changes made to42e3770e65.
This commit is contained in:
@@ -33,10 +33,11 @@
|
||||
this.activateStickyElements();
|
||||
|
||||
// first off show the new template / new folder buttons
|
||||
this.currentState = this.$form.data('prev-state') || 'unknown';
|
||||
if (this.currentState === 'unknown') {
|
||||
this._lastState = this.$form.data('prev-state');
|
||||
if (this._lastState === undefined) {
|
||||
this.selectActionButtons();
|
||||
} else {
|
||||
this.currentState = this._lastState;
|
||||
this.render();
|
||||
}
|
||||
|
||||
@@ -144,11 +145,21 @@
|
||||
}
|
||||
};
|
||||
|
||||
// method that checks the state against the last one, used prior to render() to see if needed
|
||||
this.stateChanged = function() {
|
||||
let changed = this.currentState !== this._lastState;
|
||||
|
||||
this._lastState = this.currentState;
|
||||
return changed;
|
||||
};
|
||||
|
||||
this.actionButtonClicked = function(event) {
|
||||
event.preventDefault();
|
||||
this.currentState = $(event.currentTarget).val();
|
||||
|
||||
this.render();
|
||||
if (this.stateChanged()) {
|
||||
this.render();
|
||||
}
|
||||
};
|
||||
|
||||
this.selectionStatus = {
|
||||
@@ -173,7 +184,9 @@
|
||||
this.currentState = 'nothing-selected-buttons';
|
||||
}
|
||||
|
||||
this.render();
|
||||
if (this.stateChanged()) {
|
||||
this.render();
|
||||
}
|
||||
|
||||
this.selectionStatus.update(numSelected);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user