Commit adda2752 authored by Lukas Eipert's avatar Lukas Eipert

Awards handler: replace jquery scrolling with native version

parent 46527a69
...@@ -5,6 +5,7 @@ import $ from 'jquery'; ...@@ -5,6 +5,7 @@ import $ from 'jquery';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { uniq } from 'lodash'; import { uniq } from 'lodash';
import * as Emoji from '~/emoji'; import * as Emoji from '~/emoji';
import { scrollToElement } from '~/lib/utils/common_utils';
import { dispose, fixTitle } from '~/tooltips'; import { dispose, fixTitle } from '~/tooltips';
import { deprecatedCreateFlash as flash } from './flash'; import { deprecatedCreateFlash as flash } from './flash';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
...@@ -495,12 +496,7 @@ export class AwardsHandler { ...@@ -495,12 +496,7 @@ export class AwardsHandler {
} }
scrollToAwards() { scrollToAwards() {
const options = { scrollToElement('.awards', { offset: -110 });
scrollTop: $('.awards').offset().top - 110,
};
// eslint-disable-next-line no-jquery/no-animate
return $('body, html').animate(options, 200);
} }
addEmojiToFrequentlyUsedList(emoji) { addEmojiToFrequentlyUsedList(emoji) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment