codapi icon indicating copy to clipboard operation
codapi copied to clipboard

editing stops working in firefox

Open arogozhnikov opened this issue 3 months ago • 5 comments

reproduction:

  1. open https://codapi.org/embed/?sandbox=cpp&src=/assets/code/hello.cpp (or use any editor on web page).
  2. Start editing, i.e. just adding empty lines in the middle - editing stops working at some point.

PS: cool project!

arogozhnikov avatar Sep 13 '25 04:09 arogozhnikov

Works fine for me. Maybe some browser extension causes this on your machine? Please try in the Private mode with all extensions disabled.

nalgeon avatar Sep 14 '25 21:09 nalgeon

interesting. I've tried in private mode without extensions, but behavior persists. It seems to be position-dependent 🤷 :

#include <iostream>
#include <string>

void greet(const std::string& name) {
    std::cout << "Hello, " << name << "!" << std::endl;
}

// <- adding lines here works

int main() { // <- adding lines after this does not work
    greet("World");
}

arogozhnikov avatar Sep 14 '25 21:09 arogozhnikov

Thanks, I see it now. The issue is probably related to the editor used on the codapi.org site, not the Codapi widget, so I probably won't fix it. But I'll look into it if I have time.

nalgeon avatar Sep 15 '25 15:09 nalgeon

Confirmed: it's an editor bug, not related to Codapi.

nalgeon avatar Sep 17 '25 19:09 nalgeon

I've requested a new version of the editor with a fix.

nalgeon avatar Sep 17 '25 19:09 nalgeon