mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix monkey patch for clipboard.js
This commit is contained in:
parent
1672ca4edb
commit
d683b0379b
@ -72,6 +72,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
|
|||||||
link: (scope, elem) => {
|
link: (scope, elem) => {
|
||||||
var ignoreSideMenuHide;
|
var ignoreSideMenuHide;
|
||||||
var body = $('body');
|
var body = $('body');
|
||||||
|
$.fn.modal.Constructor.prototype.enforceFocus = function() {}; // see https://github.com/zenorocha/clipboard.js/issues/155
|
||||||
|
|
||||||
// handle sidemenu open state
|
// handle sidemenu open state
|
||||||
scope.$watch('contextSrv.sidemenu', newVal => {
|
scope.$watch('contextSrv.sidemenu', newVal => {
|
||||||
|
@ -90,7 +90,6 @@ function (angular, _, $, require, config) {
|
|||||||
module.directive('clipboardButton',function() {
|
module.directive('clipboardButton',function() {
|
||||||
return function(scope, elem) {
|
return function(scope, elem) {
|
||||||
require(['vendor/clipboard/dist/clipboard'], function(Clipboard) {
|
require(['vendor/clipboard/dist/clipboard'], function(Clipboard) {
|
||||||
$.fn.modal.Constructor.prototype.enforceFocus = function() {}; // see https://github.com/zenorocha/clipboard.js/issues/155
|
|
||||||
scope.clipboard = new Clipboard(elem[0]);
|
scope.clipboard = new Clipboard(elem[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user