Code Monkey home page Code Monkey logo

tauri-plugin-context-menu's People

Contributors

c2r0b avatar silverluke avatar wyhaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tauri-plugin-context-menu's Issues

[bug] windows 10 open context menu unresponsive

Hey ๐Ÿ‘‹, excuse me. I'm using this plugin in EcoPaste, but I'm getting feedback that the context menu is unresponsive in Windows 10, and partially in other communities as well! After some troubleshooting, this may not be an issue with EcoPaste, as it is fine on both MacOS and Windows 11! Hope you guys can help me out with this, thanks ๐ŸŒน!

image

Versioning issue

    Updating crates.io index
error: failed to select a version for `tauri`.
    ... required by package `tauri-plugin-context-menu v0.5.0 (https://github.com/c2r0b/tauri-plugin-context-menu?branch=main#41d5cec1)`
    ... which satisfies git dependency `tauri-plugin-context-menu` of package `my-project v0.0.1 (C:\workspace\my-project\src-tauri)`
versions that meet the requirements `^1.5` are: 1.5.2, 1.5.1, 1.5.0

all possible versions conflict with previously selected packages.

  previously selected package `tauri v1.4.1`
    ... which satisfies dependency `tauri = "^1.4"` (locked to 1.4.1) of package `my-project v0.0.1 (C:\workspace\my-project\src-tauri)`

BUG: [Linux] context menu is closed immediately

linux.mov

There is nothing wrong with the JS events, everything is the expected behavior, this error doesn't happen every time, but it occurs quite frequently.

There is also a GTK warning, which I'm not sure is relevant:

No trigger event for menu popup

System: Fedora 39

Add metadata (event payload)

Great plugin !

Is there any plan to support metadata?

like:
{
label: 'My first subitem',
event: 'my_first_subitem',
metadata: '{"id":123}' // any string
}

x11: context menu location error

Reproduction

export GDK_BACKEND=x11
npm run examples/vanilla

You will see that the context menu is not in the same position as the mouse, it seems to be based on the position of the screen.

If you use wayland backend, you won't have this issue.

export GDK_BACKEND=wayland
npm run examples/vanilla

Note: AppImage built on Tauri uses x11 as backend.

Crashed with 'Class should exist' error on macOS M1

I tried with the latest version 0.7.1 on macOS 14.2.1 (23C71) (Apple M1), but when tauriApi.invoke was called, the app crashed and got the following error:

thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-plugin-context-menu-0.7.1/src/macos.rs:205:60:
Class should exist
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_display
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:197:5
   3: core::panicking::panic_str
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:172:5
   4: core::option::expect_failed
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/option.rs:1995:5
   5: core::option::Option<T>::expect
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/option.rs:896:21
   6: tauri_plugin_context_menu::os::create_context_menu
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-plugin-context-menu-0.7.1/src/macos.rs:205:13
   7: tauri_plugin_context_menu::os::show_context_menu::{{closure}}
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-plugin-context-menu-0.7.1/src/macos.rs:221:20
   8: dispatch::context_and_function::work_execute_closure
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dispatch-0.2.0/src/lib.rs:94:9
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <() as objc::message::MessageArguments>::invoke
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:128:17
  22: objc::message::platform::send_unverified::{{closure}}
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/apple/mod.rs:27:9
  23: objc_exception::try::{{closure}}
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc_exception-0.1.2/src/lib.rs:68:31
  24: objc_exception::try_no_ret::try_objc_execute_closure
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc_exception-0.1.2/src/lib.rs:34:9
  25: RustObjCExceptionTryCatch
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc_exception-0.1.2/extern/exception.m:10:9
  26: objc_exception::try_no_ret
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc_exception-0.1.2/src/lib.rs:44:19
  27: objc_exception::try
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc_exception-0.1.2/src/lib.rs:67:9
  28: objc::exception::try
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/exception.rs:8:5
  29: objc::message::platform::send_unverified
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/apple/mod.rs:26:5
  30: objc::message::send_message
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:178:5
  31: tao::platform_impl::platform::event_loop::EventLoop<T>::run_return
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.16.9/src/platform_impl/macos/event_loop.rs:193:16
  32: tao::platform_impl::platform::event_loop::EventLoop<T>::run
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.16.9/src/platform_impl/macos/event_loop.rs:160:21
  33: tao::event_loop::EventLoop<T>::run
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.16.9/src/event_loop.rs:179:5
  34: <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::run
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-runtime-wry-0.14.8/src/lib.rs:2299:5
  35: tauri::app::App<R>::run
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.6.7/src/app.rs:868:5
  36: tauri::app::Builder<R>::run
             at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.6.7/src/app.rs:1723:5
  37: testapp_lib::run
             at ./src/lib.rs:81:3
  38: testapp_app::main
             at ./src/main.rs:7:3
  39: core::ops::function::FnOnce::call_once
             at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
libc++abi: terminating due to uncaught foreign exception

Any ideas?

Linux support

Running github action to make a release

The windows and the Mac workflow build succeeded but the Linux Ubuntu some how failed due to the error below

   Compiling tauri-plugin-oauth v0.0.0 (https://github.com/FabianLars/tauri-plugin-oauth?branch=main#26e38115)
   Compiling tauri-plugin-context-menu v0.5.0 (https://github.com/c2r0b/tauri-plugin-context-menu?branch=main#41d5cec1)
error[E0433]: failed to resolve: use of undeclared crate or module `os`
  --> /home/runner/.cargo/git/checkouts/tauri-plugin-context-menu-2c3100763c3e1052/41d5cec/src/lib.rs:60:9
   |
60 |         os::show_context_menu(context_menu, window, pos, items);
   |         ^^ use of undeclared crate or module `os`

Menu position is wrong in the second display

I use a second display connecting to my MacBook Pro. The context menu works fine in the main display (the MacBook one), but the menu position is outside of the app in the second display.

Any ideas?

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.