Problem with resizing Tables from Firefox 64.0 onwards
Categories
(Core :: DOM: Editor, defect)
Tracking
()
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:
-
Go here https://results.totallympics.com/forum.php?mod=post&action=newthread&fid=36
and login with Username: test Password: test -
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
-
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)
Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
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.
Reporter | ||
Comment 3•5 years ago
|
||
Any chance this can be fixed from version 66.0 on ?
Thank you!
Comment 4•5 years ago
|
||
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.
Reporter | ||
Comment 5•5 years ago
|
||
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.
Comment 6•5 years ago
|
||
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.
Reporter | ||
Comment 7•5 years ago
|
||
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.
Comment 8•5 years ago
|
||
Comment 9•5 years ago
|
||
Looks like this is expected given bug 1449564. Looks like you can enable the resizer again using execCommand.
Mind confirming Masayuki? Thanks!
Reporter | ||
Comment 10•5 years ago
|
||
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!
Comment 11•5 years ago
|
||
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.
Reporter | ||
Comment 12•5 years ago
|
||
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!
Comment 13•5 years ago
|
||
Just putting <script>document.execCommand("enableObjectResizing", false, true);</script>
somewhere in the <head>
of your website should work.
Reporter | ||
Comment 14•5 years ago
|
||
I have tried and it's not working for me. Is it working for you ?
Comment 15•5 years ago
|
||
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.
Reporter | ||
Comment 16•5 years ago
|
||
Oh damn, that looks so complicated :(
What do you mean when you say "run"? How do I run this?
Thank you.
Comment 17•5 years ago
|
||
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).
Reporter | ||
Comment 18•5 years ago
|
||
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!
Comment 19•5 years ago
|
||
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);
Reporter | ||
Comment 20•5 years ago
|
||
Reporter | ||
Comment 21•5 years ago
|
||
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!
Comment 22•5 years ago
|
||
Hmm, that looks right, huh. Does it work to put it right after:
editdoc.designMode = allowhtml ? 'on' : 'off';
?
Reporter | ||
Comment 23•5 years ago
|
||
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 !
Comment 24•5 years ago
|
||
(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, the
Document.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.
Reporter | ||
Comment 25•5 years ago
|
||
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!
Description
•