@ag-grid-enterprise/clipboard
Advanced tools
Comparing version 25.2.0 to 25.3.0
@@ -20,2 +20,3 @@ import { BeanStub, CellPositionUtils, Column, GridCompController, IClipboardService, RowPositionUtils } from "@ag-grid-community/core"; | ||
private gridCompController; | ||
private navigatorApiFailed; | ||
registerGridCompController(gridCompController: GridCompController): void; | ||
@@ -22,0 +23,0 @@ private init; |
@@ -26,3 +26,5 @@ "use strict"; | ||
function ClipboardService() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.navigatorApiFailed = false; | ||
return _this; | ||
} | ||
@@ -46,3 +48,3 @@ ClipboardService.prototype.registerGridCompController = function (gridCompController) { | ||
// but also if the `readText` method is public. | ||
if (allowNavigator && navigator.clipboard && navigator.clipboard.readText) { | ||
if (allowNavigator && !this.navigatorApiFailed && navigator.clipboard && navigator.clipboard.readText) { | ||
navigator.clipboard.readText() | ||
@@ -59,2 +61,3 @@ .then(this.processClipboardData.bind(this)) | ||
}, 'clipboardApiError'); | ||
_this.navigatorApiFailed = true; | ||
_this.pasteFromClipboardLegacy(); | ||
@@ -61,0 +64,0 @@ }); |
@@ -20,2 +20,3 @@ import { BeanStub, CellPositionUtils, Column, GridCompController, IClipboardService, RowPositionUtils } from "@ag-grid-community/core"; | ||
private gridCompController; | ||
private navigatorApiFailed; | ||
registerGridCompController(gridCompController: GridCompController): void; | ||
@@ -22,0 +23,0 @@ private init; |
@@ -24,3 +24,5 @@ var __extends = (this && this.__extends) || (function () { | ||
function ClipboardService() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.navigatorApiFailed = false; | ||
return _this; | ||
} | ||
@@ -44,3 +46,3 @@ ClipboardService.prototype.registerGridCompController = function (gridCompController) { | ||
// but also if the `readText` method is public. | ||
if (allowNavigator && navigator.clipboard && navigator.clipboard.readText) { | ||
if (allowNavigator && !this.navigatorApiFailed && navigator.clipboard && navigator.clipboard.readText) { | ||
navigator.clipboard.readText() | ||
@@ -57,2 +59,3 @@ .then(this.processClipboardData.bind(this)) | ||
}, 'clipboardApiError'); | ||
_this.navigatorApiFailed = true; | ||
_this.pasteFromClipboardLegacy(); | ||
@@ -59,0 +62,0 @@ }); |
{ | ||
"name": "@ag-grid-enterprise/clipboard", | ||
"version": "25.2.0", | ||
"version": "25.3.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components", | ||
@@ -46,5 +46,5 @@ "main": "./dist/cjs/main.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~25.2.0", | ||
"@ag-grid-community/csv-export": "~25.2.0", | ||
"@ag-grid-enterprise/core": "~25.2.0" | ||
"@ag-grid-community/core": "~25.3.0", | ||
"@ag-grid-community/csv-export": "~25.3.0", | ||
"@ag-grid-enterprise/core": "~25.3.0" | ||
}, | ||
@@ -51,0 +51,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
6277616
98583
+ Added@ag-grid-community/core@25.3.0(transitive)
+ Added@ag-grid-community/csv-export@25.3.0(transitive)
+ Added@ag-grid-enterprise/core@25.3.0(transitive)
- Removed@ag-grid-community/core@25.2.0(transitive)
- Removed@ag-grid-community/csv-export@25.2.0(transitive)
- Removed@ag-grid-enterprise/core@25.2.0(transitive)