Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GHS] Error when pasting content with tabs from Google Docs #10886

Closed
FilipTokarski opened this issue Nov 23, 2021 · 1 comment
Closed

[GHS] Error when pasting content with tabs from Google Docs #10886

FilipTokarski opened this issue Nov 23, 2021 · 1 comment
Labels
package:html-support resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@FilipTokarski
Copy link
Member

FilipTokarski commented Nov 23, 2021

📝 Provide detailed reproduction steps (if any)

  1. Open a google doc document
  2. Type foo, press tab, type bar
  3. Select this content
  4. Paste into editor which has GHS options:
htmlSupport: {
	allow: [
		{
			name: /.*/,
			attributes: true,
			classes: true
		}
	]
}

✔️ Expected result

Content is pasted, no errors.

❌ Actual result

Content is not pasted. Errors in the console:

Uncaught TypeError: target[key] is not iterable
    at mergeViewElementAttributes (conversionutils.js:48)
    at UpcastDispatcher.dispatcher.on.priority (converters.js:104)
    at UpcastDispatcher.fire (emittermixin.js:199)
    at UpcastDispatcher._convertItem (upcastdispatcher.js:249)
    at UpcastDispatcher._convertChildren (upcastdispatcher.js:282)
    at UpcastDispatcher.dispatcher.on.priority (converters.js:95)
    at UpcastDispatcher.fire (emittermixin.js:199)
    at UpcastDispatcher._convertItem (upcastdispatcher.js:249)
    at UpcastDispatcher._convertChildren (upcastdispatcher.js:282)
    at UpcastDispatcher.<anonymous> (upcasthelpers.js:439)

Clipboard content:

<meta charset='utf-8'><meta charset="utf-8"><b style="font-weight:normal;" id="docs-internal-guid-a8b55294-7fff-ceb1-1e3f-df64b7c7ec04"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">foo</span><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;"><span class="Apple-tab-span" style="white-space:pre;"> </span></span><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">bar</span></b>

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@FilipTokarski FilipTokarski added type:bug This issue reports a buggy (incorrect) behavior. squad:core Issue to be handled by the Core team. package:html-support labels Nov 23, 2021
@FilipTokarski
Copy link
Member Author

It's a duplicate of #10657, closing.

@AnnaTomanek AnnaTomanek added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:html-support resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants