Skip to content
Snippets Groups Projects

Account for fixed position MR when scrolling to elements

Merged Luke Bennett requested to merge 23520-mr-sticky-tabs-overlap-discussion-from-anchor into master
1 unresolved thread
189 files
+ 2374
1021
Compare changes
  • Side-by-side
  • Inline
Files
189
@@ -68,14 +68,10 @@
@@ -68,14 +68,10 @@
// To be implemented on the extending class
// To be implemented on the extending class
// e.g.
// e.g.
// Api.gitignoreText item.name, @requestFileSuccess.bind(@)
// Api.gitignoreText item.name, @requestFileSuccess.bind(@)
requestFileSuccess(file, { skipFocus, append } = {}) {
requestFileSuccess(file, { skipFocus } = {}) {
const oldValue = this.editor.getValue();
const oldValue = this.editor.getValue();
let newValue = file.content;
let newValue = file.content;
if (append && oldValue.length && oldValue !== newValue) {
newValue = oldValue + '\n\n' + newValue;
}
this.editor.setValue(newValue, 1);
this.editor.setValue(newValue, 1);
if (!skipFocus) this.editor.focus();
if (!skipFocus) this.editor.focus();
@@ -99,4 +95,3 @@
@@ -99,4 +95,3 @@
global.TemplateSelector = TemplateSelector;
global.TemplateSelector = TemplateSelector;
})(window.gl || ( window.gl = {}));
})(window.gl || ( window.gl = {}));
Loading