Closed Bug 1531435 Opened 5 years ago Closed 5 years ago

Problem with resizing Tables from Firefox 64.0 onwards

Categories

(Core :: DOM: Editor, defect)

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: matteo.sindona, Unassigned)

References

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

  1. Go here https://results.totallympics.com/forum.php?mod=post&action=newthread&fid=36
    and login with Username: test Password: test

  2. Open this page (or any other page with a table) in another tab: https://dataride.uci.ch/Results/iframe/EventResults/174708?competitionId=55177&disciplineId=7

  3. Select and copy some lines of the table of step 2) and paste it into the text box of the link of step 1)

Actual results:

The table is copied but there are no symbols to add/remove rows/columns and to resize the table. These symbols were there since literally the first version of Firefox until version 63.0.3 included, but they are not there anymore from version 64.0 onwards.

Expected results:

Symbols to add/remove rows/columns and to resize the table should appear on the table and cells edges (see picture in the next post)

Reproducible.

Tested on following builds

Build ID 20190124174741
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

Placing it in Core: Layout: Tables if it's not correct please feel free to change it.

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Tables
Ever confirmed: true
Product: Firefox → Core

Any chance this can be fixed from version 66.0 on ?

Thank you!

We need a regression range to pin point what caused the issue. Also, a standalone HTML test-case that reproduces the bug would be useful, if you could build one.

Unfortunately I do not have any competence to do that. I hope someone else can help me and this problem to be solved in the next releases, because it makes Firefox impossible to use with this problem.

Yeah, that's why I flagged the bug as regressionwindow-wanted.

I'd do it myself, but I don't have an anything close to a stable enough internet connection right now.

You can probably do it as well if you feel motivated: https://mozilla.github.io/mozregression/quickstart.html

Thanks! And sorry this bug fell without action for so long.

I have tried to watch the tutorial but I have no idea how to make it work. I can not even install 2 versions of Firefox because if I install a new one the old one get overwritten.

I'm sorry, but I would need someone to do the regression for me. Thank you.

Looks like this is expected given bug 1449564. Looks like you can enable the resizer again using execCommand.

Mind confirming Masayuki? Thanks!

Blocks: 1449564
Component: Layout: Tables → Editor
Flags: needinfo?(masayuki)

Hello Emilio, how can I enable the resizer again? And do I have to do it just once and then it will be enabled until I disable or I should manually enable it every time I load a page?

Thank you!

If the website is yours, looking at the tests in that bug, you can run:

document.execCommand("enableObjectResizing", false, true);

If not, as a user, we could provide a pref to allow tweaking the default. Maybe Masayuki has opinions on that but it shouldn't be too hard if he's fine with that.

That website is mine, but as you can see I'm not good in these things at all. How and where should I run that code ?

Also, I run the website but that's a forum where also other users need the resizer.

Thank you!

Just putting <script>document.execCommand("enableObjectResizing", false, true);</script> somewhere in the <head> of your website should work.

I have tried and it's not working for me. Is it working for you ?

The editor is in an iframe, so you need to wait until that iframe is in the DOM or something, and then run:

document.getElementById("e_iframe").contentDocument.execCommand("enableObjectResizing", false, true);
document.getElementById("e_iframe").contentDocument.execCommand("enableInlineTableEditing", false, true);

That works for me.

Oh damn, that looks so complicated :(

What do you mean when you say "run"? How do I run this?

Thank you.

You can run it adding that in a <script> to your page (but I don't know how you setup the editor). For testing I ran it from the developer tools (Help > Web Developer > Web Console).

Sorry to bother you with that. But just to be sure:
after I add <script>document.execCommand("enableObjectResizing", false, true);</script> in the <head> of my website, should the problem be automatically fixed ? Or some other action is required ?

I actually was not able to add that in the head but I can ask my websmaster to do that. But after that, should I just wait or do something else?

Thank you!

No, adding that to <head> wouldn't work, since the editable document is not created by then.

Can you edit this file? https://results.totallympics.com/static/js/editor.js

If so, adding the following two lines after the editdoc.close() line will work:

editdoc.execCommand("enableObjectResizing", false, true);
editdoc.execCommand("enableInlineTableEditing", false, true);
Attached image Attachment 3

Yes, I can access that file and I added the two lines (see the attachment to check if everything is correct). It's still not working for me though, is it working for you ? Maybe we have to wait as you said ? Or maybe should I also edit the <head> as you said in comment 13?

Thank you!

Hmm, that looks right, huh. Does it work to put it right after:

editdoc.designMode = allowhtml ? 'on' : 'off';

?

I have added that and it's still not working. Please have in mind I DID NOT edit the <head> part (I can't find where that part is so I would have to ask my webmaster to add that). Maybe is it necessary to do that as well?

Thank you !

(In reply to Emilio Cobos Álvarez (:emilio) from comment #9)

Looks like this is expected given bug 1449564. Looks like you can enable the resizer again using execCommand.

Exactly. I made our default behavior exactly same as the other browsers. It's requested by Editing API WG of W3C.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #19)

No, adding that to <head> wouldn't work, since the editable document is not created by then.

Can you edit this file? https://results.totallympics.com/static/js/editor.js

If so, adding the following two lines after the editdoc.close() line will work:

editdoc.execCommand("enableObjectResizing", false, true);
editdoc.execCommand("enableInlineTableEditing", false, true);

Yeah, it should work. If this does not work well, it could be that we might initialize HTMLEditor instance asynchronously in this case. If so, need to do as:

setTimeout(() => {
  editdoc.execCommand("enableObjectResizing", false, true);
  editdoc.execCommand("enableInlineTableEditing", false, true);
}, 0);

Or, allowhtml might be just false (or null or undefined). Then, theDocument.designModeis not used actually, and then,editdoc.body.contentEditable = true;` makes the document editable.

If so, those execCommand should be called after the line.

Anyway, marking this as INVA.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(masayuki)
Resolution: --- → INVALID

Thank you!!

Setting this:

setTimeout(() => {
editdoc.execCommand("enableObjectResizing", false, true);
editdoc.execCommand("enableInlineTableEditing", false, true);
}, 0);

has worked!

I have another forum where I have the same problem though.

Please go here: https://totallympics.com/index.php?/topic/1373-archery-2019-discussion-thread/&do=editComment&comment=198067

Login with username: test Password: test

Click on the table and you will get the same problem: resizer objects do not appear. I have already tried to add the same code in the editor.js file but didn't work, so probably some other action is needed here.

Can you please have a look?

Thank you!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: