Open Bug 1641019 Opened 5 years ago Updated 2 years ago

Exporting table from Microsoft Excel Online to the clipboard replaces `<a>`s with their content for the "text/html" flavor

Categories

(Core :: DOM: Serializers, defect, P3)

defect

Tracking

()

Webcompat Priority P3
Tracking Status
firefox76 --- affected
firefox77 --- affected
firefox78 --- affected
firefox84 --- affected
firefox91 --- affected

People

(Reporter: clara.guerrero, Unassigned)

References

(Blocks 2 open bugs, )

Details

(Keywords: parity-chrome)

Attachments

(3 files)

Attached video ff no format.mov (deleted) —

[Affected versions]
Release 76.0 (64-bit)
Beta 77.0b8 (64-bit)
Firefox Nightly 78.0a1 (2020-05-21) (64-bit)

[Affected platforms]
( macOS 10.14 (Mojave))

[Steps to reproduce]

1- Launch the Firefox Browser and open https://docs.google.com/spreadsheets and https://www.office.com/launch/excel in the same window.
2- Create a table in onedrive spreadsheet and give format (borders, bold font, hyperlinks etc).
3- Select table and copy
4- Paste it in the other online editor (google docs)
5- Data is pasted without format at all.

Note this won't happen in chrome (see attachments for more details)

[Expected result]
FF should keep the table's format when pasting in an online editor.

[Actual result]
Format is lost when pasting.

Severity: -- → S3
Component: DOM: Selection → DOM: Serializers
Priority: -- → P3
Attached image ppt.png (deleted) —

Pasting into a ppt document also randomly won't keep format (it does not happen 100% of the times)

Notice that pasting from https://www.office.com/launch/excel one drive excell to html editor or WYSWYG editor won't keep format either. (but pasting to installed app will keep hyperlinks working at least)

Used the season table from https://en.wikipedia.org/wiki/Game_of_Thrones.

The online version of Microsoft Excel (which a OneDrive spreadsheet uses) creates the following "text/html" clipboard flavor:

<meta http-equiv="content-type" content="text/html; charset=utf-8"><pre ccp_infra_version='3' ccp_infra_timestamp='1603805591541' ccp_infra_user_hash='804634202' ccp_infra_copy_id='' data-ccp-timestamp='1603805591541'><table><tr><td>Season 1</td><td>March 2, 2010</td><td>Second half of 2010</td><td>17. Apr 11</td></tr><tr><td>Season 2</td><td>19. Apr 11</td><td>Second half of 2011</td><td>01. Apr 12</td></tr></table></pre>

but no text/_moz_htmlinfo and text/_moz_htmlcontext flavors.

That is, it a) uses JS to fill the clipboard and b) the <a>s are dropped and replaced by their content.

Chrome keeps the <a> elements, as the clipboard contents indicate:

"text/html" flavor:

<meta http-equiv="content-type" content="text/html; charset=utf-8"><div ccp_infra_version='3' ccp_infra_timestamp='1603806103470' ccp_infra_user_hash='804634202' ccp_infra_copy_id='' data-ccp-timestamp='1603806103470'><html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 15">
<style>
table
	{mso-displayed-decimal-separator:"\,";
	mso-displayed-thousand-separator:"\.";}
tr
	{mso-height-source:auto;}
col
	{mso-width-source:auto;}
td
	{padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:Calibri, sans-serif;
	mso-font-charset:0;
	text-align:general;
	vertical-align:bottom;
	border:none;
	white-space:nowrap;
	mso-rotate:0;}
.xl17
	{color:#0563C1;
	text-decoration:underline;
	text-underline-style:single;}
</style>
</head>

<body link="#0563C1" vlink="#954F72">

<table width=192 style='border-collapse:collapse;width:144pt'>
<!--StartFragment-->
 <col width=64 style='width:48pt' span=3>
 <tr height=20 style='height:15.0pt'>
  <td width=64 height=20 class=xl17 style='width:48pt;height:15.0pt'><a
  href="https://en.wikipedia.org/wiki/Game_of_Thrones_(season_1)">Season 1</a></td>
  <td width=64 style='width:48pt'>March 2, 2010</td>
  <td width=64 style='width:48pt'>Second half of 2010</td>
 </tr>
 <tr height=20 style='height:15.0pt'>
  <td height=20 class=xl17 style='height:15.0pt'><a
  href="https://en.wikipedia.org/wiki/Game_of_Thrones_(season_2)">Season 2</a></td>
  <td align=right>19. Apr 11</td>
  <td>Second half of 2011</td>
 </tr>
<!--EndFragment-->
</table>

</body>

</html>
</div>

Data generated on Ubuntu 18.04.

Summary: Copying table from onedrive spreadsheet to google docs spreadsheet won't keep format → Copying table from onedrive spreadsheet to google docs spreadsheet replaces `<a>`s with their content
Webcompat Priority: --- → ?
Summary: Copying table from onedrive spreadsheet to google docs spreadsheet replaces `<a>`s with their content → Copying table from online Excel to Google Docs spreadsheet replaces `<a>`s with their content
Summary: Copying table from online Excel to Google Docs spreadsheet replaces `<a>`s with their content → Exporting table from online Excel to the clipboard replaces `<a>`s with their content
Summary: Exporting table from online Excel to the clipboard replaces `<a>`s with their content → Exporting table from online Excel to the clipboard replaces `<a>`s with their content for "text/html"

Informed people from Microsoft about this issue, as this seems to be an issue in their JS.

Summary: Exporting table from online Excel to the clipboard replaces `<a>`s with their content for "text/html" → Exporting table from Microsoft Excel Online to the clipboard replaces `<a>`s with their content for "text/html"
Summary: Exporting table from Microsoft Excel Online to the clipboard replaces `<a>`s with their content for "text/html" → Exporting table from Microsoft Excel Online to the clipboard replaces `<a>`s with their content for the "text/html" flavor
Assignee: nobody → mbrodesser

Rares: can you please check if the issue still occurs?

Flags: needinfo?(rares.doghi)

Hi Mirko, Yes I can confirm this issue still occurs in our latest Nightly 91.0a1 (2021-06-14).

Flags: needinfo?(rares.doghi)

(In reply to Rares Doghi from comment #7)

Hi Mirko, Yes I can confirm this issue still occurs in our latest Nightly 91.0a1 (2021-06-14).

Thanks.

I've reminded Microsoft developers about this issue in order to determine if and when they'll work on it.

Webcompat Priority: ? → P3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: mbrodesser → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: