Git Product home page Git Product logo

Comments (7)

albertz avatar albertz commented on May 31, 2024

Ah, I just found the problem mentioned in the docs. But anyway, good to have it also here as a GitHub issue. Or is this a wontfix for some reason? Not sure what you mean by "security restrictions" in the doc.

from domterm.

albertz avatar albertz commented on May 31, 2024

This is fixed now with my recent MacOSX fixes.

from domterm.

PerBothner avatar PerBothner commented on May 31, 2024

You mean copy and paste now works as expected using keyboard shortcuts?
I would not expect the Paste menu command to work if using Firefox or Chrome, only if sing Electron or Qt.
The Copy menu command may work. (A recent change to not use iframes when using jsMenus seems to have fixed that.)
It seems doable to fix the Paste menu entries by having the server call the pbpaste command on behalf of the browser.

from domterm.

albertz avatar albertz commented on May 31, 2024

I meant specifically Electron (which was broken before my recent fixes).

I did not try Firefox or Chrome again. Maybe it does not work. But in principle, I don't really see a reason why it should not work (or why there is no way to make it work). I can copy & paste on any other website as well?

from domterm.

PerBothner avatar PerBothner commented on May 31, 2024

There are restrictions on whether a web application can read or write to the clipboard: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
This is to prevent a malicious web application from spying on or modifying a user's clipboard. It is possible to give an extension the needed premissions. but that seems to require the user to install an extension (or web application), which is more complicated than just opening a web page. This is not a problem when using Electron.

from domterm.

albertz avatar albertz commented on May 31, 2024

This is only when your web app catches the key event and handles it manually. But the browser already does copy & paste for you.

from domterm.

PerBothner avatar PerBothner commented on May 31, 2024

"This is only when your web app catches the key event and handles it manually. But the browser already does copy & paste for you."

Copy/Paste key-bindings work, and the browser Edit menu seems to work. I'm concerned about handling menu events when using the jsMenus package, which is a plain-JavaScript library. It would be nice to have Paste working in that case.

from domterm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.