MozillaZine

help me debug strange case of cannot copy from codingame.com

User Help for Mozilla Firefox
HadroLepton
 
Posts: 11
Joined: August 24th, 2004, 8:48 am

Post Posted August 12th, 2019, 3:08 pm

i cannot copy (ctrl+c) from the editor of codingame.com and i do not know why. please help me find out why.

you can try the editor here: https://www.codingame.com/ide/puzzle/onboarding
(should be reachable without an account)

i am using firefox 68 under arch linux.

the symptoms: copy using ctrl+c and mouse highlight from the editor does not work. copy (both methods) from anywhere else works. paste using ctrl+v in the editor works. paste using middle mouse click in editor does not work.

more detail: copy using ctrl+c from editor will just blank the ctrl+c buffer. that means trying to paste elsewhere will just do nothing. copy using mouse highlight from the editor will just do nothing. that means paste elsewhere will paste whatever was selected before selecting in the editor.

i have tried using another browser, chromium: copy paste works as expected.
i have tried using a blank profile in firefox: copy paste works as expected.
i have tried disabling every addon in my profile: copy does not work regardless of what addon is enabled or disabled.

addons that i use: ublock origin, cookie auto delete, disable html5 autoplay, save to the wayback machine, and uppity.

so it seems that there is some setting in my firefox profile which collides with some javascript from codingame editor. i have tried changing some about:config setting to default (for example dom.event.contextmenu.enabled) but copy still does not work. this firefox profile is old. i have customized many settings in about:config over the years. mainly things like preventing flash from starting (click to play) and preventing html5 videos from playing. many of which may be obsolete by now (looking at you html5 videos).

please help me debug the issue. what can i try? where can i look? what information can i collect?
Last edited by HadroLepton on August 13th, 2019, 11:51 am, edited 1 time in total.

DanRaisch
Moderator

User avatar
 
Posts: 121739
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted August 12th, 2019, 5:05 pm

Moving to Firefox Support as no bug has yet been identified here and the OP reports that a new, blank profile works properly.

jscher2000

User avatar
 
Posts: 10674
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted August 12th, 2019, 5:33 pm

It looks like the site uses the Ace editor -- https://ace.c9.io/ -- although it's very configurable, so even if it works for you on one site it might be different on another.

How about the clipboard event preference: dom.event.clipboardevents.enabled

dfoulkes

User avatar
 
Posts: 22545
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Post Posted August 12th, 2019, 9:07 pm

HadroLepton, looks like you tried a ton of things to find your problem... other that what jscher2000 suggested...but one thing that I don't see in your list is restarting that profile in safe-mode. That mode performs other things and it's a good/strong test...

Try running Firefox in safe-mode... NOTE: This is a testing procedure only ... NOT for normal browsing.
-- On the menu bar, click the Help menu and select Restart with Add-ons Disabled....
Firefox will start up with the Firefox Safe Mode dialog. Click continue in Safe Mode and don't check any items.

Note: You can also start Firefox in Safe Mode by holding down the shift key while Single/Double clicking on the icon.
* (option key while starting Firefox on Mac).

-----------------------------------------------------------------------------------------
>What safe-mode does ..... Safe Mode temporarily affects the following:
* All extensions are disabled. --- * The userChrome.css and userContent.css files are ignored.
* The default theme is used, without a persona. --- * The default toolbar layout is used.
* The Just-in-time (JIT) JavaScript compiler is disabled. --- * Hardware acceleration is disabled.

-- Safe Mode has no effect on the following --
* The status of plugins is not affected.
* Custom preferences are not affected.

This is the link to the main KB article for Safe-Mode ... but, use the above info 1st...
Safe Mode - MozillaZine Knowledge Base
As you can see she's (The CAT) always alert and on the prowl for Meoware !!

HadroLepton
 
Posts: 11
Joined: August 24th, 2004, 8:48 am

Post Posted August 13th, 2019, 12:00 pm

thank you for the replies.

i tried the ace editor in the website (https://ace.c9.io/). copy using ctrl+c works there. so it seems to be a problem with some extra configuration in the codingame ace editor.

the problem was dom.event.clipboardevents.enabled in about:config. i disabled that after reading about pastejacking (https://github.com/dxa4481/Pastejacking) then forgot about it. enabling dom.event.clipboardevents.enabled makes copy using ctrl+c work in codingame editor. the eternal conflict between comfort and security.

copy and paste using mouse selection and middle mouse click still does not work. not in codingame editor and not in ace editor website. regardless of setting of dom.event.clipboardevents.enabled. i can live with that thought.

note that i made a slight error in my first symptom description. i first said that copy using mouse selection worked. it does not. i have edited my first post to reflect that.

restarting in safe mode did not make a difference. i tried safe mode before re-enabling dom.event.clipboardevents.enabled. addons were disabled but copy using ctrl+c still didn't work. it seems that safe mode does not reset about:config. at least not dom.event.clipboardevents.enabled.

thank you for the help.

dickvl

User avatar
 
Posts: 52743
Joined: July 18th, 2005, 3:25 am

Post Posted August 13th, 2019, 12:53 pm

Do the Ctrl+Insert and Shift+Insert alternatives work?

HadroLepton
 
Posts: 11
Joined: August 24th, 2004, 8:48 am

Post Posted August 14th, 2019, 10:46 am

thank you for the reply

ctrl+insert and shift+insert work as ctrl+c and ctrl+v work.

that is: if dom.event.clipboardevents.enabled is true they both work. if it is false they both do not work.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 11 guests