Переглянути джерело

fix monkey patch for clipboard.js

Mitsuhiro Tanda 9 роки тому
батько
коміт
d683b0379b

+ 1 - 0
public/app/core/components/grafana_app.ts

@@ -72,6 +72,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
     link: (scope, elem) => {
       var ignoreSideMenuHide;
       var body = $('body');
+      $.fn.modal.Constructor.prototype.enforceFocus = function() {}; // see https://github.com/zenorocha/clipboard.js/issues/155
 
       // handle sidemenu open state
       scope.$watch('contextSrv.sidemenu', newVal => {

+ 0 - 1
public/app/features/dashboard/shareModalCtrl.js

@@ -90,7 +90,6 @@ function (angular, _, $, require, config) {
   module.directive('clipboardButton',function() {
     return function(scope, elem) {
       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]);
       });