Copy from editor does not work in my firefox profile


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

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?


Hard to tell with a customized profile.
You can test the editor outside CodinGame here to find out if it’s a problem with the editor itself or the website around it.

For the latter one you chances for help are probably higher when you ask in the github of the editor.


thank you for reply. i tried the ace editor in the website ( copy using ctrl+c works there. so it seems to be a problem with some extra configuration in the codingame ace editor.

i have found the problem. it was dom.event.clipboardevents.enabled in about:config. i disabled that after reading about 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.


Pretty weird. I believed ctrl+c and mouse copy trigger the exact same event. But obviously it is not the case.