Commit f1d59ff2 authored by Nathan Friend's avatar Nathan Friend

Merge branch 'leipert-remove-ie11-key' into 'master'

Remove deprecated IE11 Esc key case

See merge request gitlab-org/gitlab!39711
parents ea665b59 3c194b70
/* eslint-disable @gitlab/require-i18n-strings */
export const ESC_KEY = 'Escape';
export const ESC_KEY_IE11 = 'Esc'; // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
export const ENTER_KEY = 'Enter';
......@@ -7,7 +7,7 @@ import DashboardHeader from './dashboard_header.vue';
import DashboardPanel from './dashboard_panel.vue';
import { s__ } from '~/locale';
import createFlash from '~/flash';
import { ESC_KEY, ESC_KEY_IE11 } from '~/lib/utils/keys';
import { ESC_KEY } from '~/lib/utils/keys';
import { mergeUrlParams, updateHistory } from '~/lib/utils/url_utility';
import invalidUrl from '~/lib/utils/invalid_url';
import Icon from '~/vue_shared/components/icon.vue';
......@@ -311,7 +311,7 @@ export default {
},
onKeyup(event) {
const { key } = event;
if (key === ESC_KEY || key === ESC_KEY_IE11) {
if (key === ESC_KEY) {
this.clearExpandedPanel();
}
},
......
......@@ -2,7 +2,7 @@ import { shallowMount, mount } from '@vue/test-utils';
import VueDraggable from 'vuedraggable';
import MockAdapter from 'axios-mock-adapter';
import { TEST_HOST } from 'helpers/test_constants';
import { ESC_KEY, ESC_KEY_IE11 } from '~/lib/utils/keys';
import { ESC_KEY } from '~/lib/utils/keys';
import { objectToQuery } from '~/lib/utils/url_utility';
import axios from '~/lib/utils/axios_utils';
import { dashboardEmptyStates, metricStates } from '~/monitoring/constants';
......@@ -566,15 +566,6 @@ describe('Dashboard', () => {
undefined,
);
});
it('restores dashboard from full screen by typing the Escape key on IE11', () => {
mockKeyup(ESC_KEY_IE11);
expect(store.dispatch).toHaveBeenCalledWith(
`monitoringDashboard/clearExpandedPanel`,
undefined,
);
});
});
});
......
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