@atlaskit/editor-plugin-card 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#78367](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78367) [`bc524e57ea86`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc524e57ea86) - [ux] Fixes an issue where doing a select all inside an input field in an embed card would select the node.
8
+
3
9
  ## 1.1.2
4
10
 
5
11
  ### Patch Changes
@@ -23,6 +23,7 @@ var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/rea
23
23
  var _ui = require("@atlaskit/editor-common/ui");
24
24
  var _utils = require("@atlaskit/editor-common/utils");
25
25
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
26
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
27
  var _smartCard = require("@atlaskit/smart-card");
27
28
  var _actions = require("../pm-plugins/actions");
28
29
  var _ResizableEmbedCard = _interopRequireDefault(require("../ui/ResizableEmbedCard"));
@@ -365,9 +366,16 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
365
366
  value: function createDomRef() {
366
367
  var domRef = document.createElement('div');
367
368
  if (this.reactComponentProps.platform !== 'mobile') {
368
- // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
369
- // see also: https://github.com/ProseMirror/prosemirror/issues/884
370
- domRef.contentEditable = 'true';
369
+ // This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
370
+ // It is a tradeoff for the bug mentioned below that occurs in Chrome.
371
+ // See: HOT-107830
372
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.card.fix-embed-card-select-all')) {
373
+ domRef.contentEditable = 'false';
374
+ } else {
375
+ // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
376
+ // see also: https://github.com/ProseMirror/prosemirror/issues/884
377
+ domRef.contentEditable = 'true';
378
+ }
371
379
  domRef.setAttribute('spellcheck', 'false');
372
380
  }
373
381
  return domRef;
@@ -9,6 +9,7 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
9
9
  import { findOverflowScrollParent, MediaSingle as RichMediaWrapper, UnsupportedBlock } from '@atlaskit/editor-common/ui';
10
10
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
11
11
  import { DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
12
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
13
  import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
13
14
  import { registerCard } from '../pm-plugins/actions';
14
15
  import ResizableEmbedCard from '../ui/ResizableEmbedCard';
@@ -342,9 +343,16 @@ export class EmbedCard extends ReactNodeView {
342
343
  createDomRef() {
343
344
  const domRef = document.createElement('div');
344
345
  if (this.reactComponentProps.platform !== 'mobile') {
345
- // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
346
- // see also: https://github.com/ProseMirror/prosemirror/issues/884
347
- domRef.contentEditable = 'true';
346
+ // This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
347
+ // It is a tradeoff for the bug mentioned below that occurs in Chrome.
348
+ // See: HOT-107830
349
+ if (getBooleanFF('platform.editor.card.fix-embed-card-select-all')) {
350
+ domRef.contentEditable = 'false';
351
+ } else {
352
+ // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
353
+ // see also: https://github.com/ProseMirror/prosemirror/issues/884
354
+ domRef.contentEditable = 'true';
355
+ }
348
356
  domRef.setAttribute('spellcheck', 'false');
349
357
  }
350
358
  return domRef;
@@ -20,6 +20,7 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
20
20
  import { findOverflowScrollParent, MediaSingle as RichMediaWrapper, UnsupportedBlock } from '@atlaskit/editor-common/ui';
21
21
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
22
22
  import { DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
23
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
23
24
  import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
24
25
  import { registerCard } from '../pm-plugins/actions';
25
26
  import ResizableEmbedCard from '../ui/ResizableEmbedCard';
@@ -358,9 +359,16 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
358
359
  value: function createDomRef() {
359
360
  var domRef = document.createElement('div');
360
361
  if (this.reactComponentProps.platform !== 'mobile') {
361
- // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
362
- // see also: https://github.com/ProseMirror/prosemirror/issues/884
363
- domRef.contentEditable = 'true';
362
+ // This fixes an issue with input fields in cross domain iframes (ie. databases and jira fields from different domains)
363
+ // It is a tradeoff for the bug mentioned below that occurs in Chrome.
364
+ // See: HOT-107830
365
+ if (getBooleanFF('platform.editor.card.fix-embed-card-select-all')) {
366
+ domRef.contentEditable = 'false';
367
+ } else {
368
+ // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
369
+ // see also: https://github.com/ProseMirror/prosemirror/issues/884
370
+ domRef.contentEditable = 'true';
371
+ }
364
372
  domRef.setAttribute('spellcheck', 'false');
365
373
  }
366
374
  return domRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -114,6 +114,9 @@
114
114
  },
115
115
  "platform.linking-platform.enable-datasource-appearance-toolbar": {
116
116
  "type": "boolean"
117
+ },
118
+ "platform.editor.card.fix-embed-card-select-all": {
119
+ "type": "boolean"
117
120
  }
118
121
  },
119
122
  "stricter": {