Cockpit.jump do not working #18873
Replies: 5 comments 2 replies
-
I'm afraid there is not enough information to help you yet. You only posted a tiny snippet of the page, and that looks correct. The first thing to try is to take a look at the JS developer console, both to see error messages there, and also to check if the onClick event actually happens (in the DOM Inspector), and to check the Networking tab for whether this actually requests the terminal URL. Do you have a runnable example somewhere? |
Beta Was this translation helpful? Give feedback.
-
I did not use the starter-kit template for development, I used create-repeat-app to test cockpit. jump() using the simplest code, but it did not work. My onClick event is running normally, but there are no messages or errors on the browser console, and no requests have been initiated on the network. |
Beta Was this translation helpful? Give feedback.
-
How do you know that your onclick event is running? I assume it's actually not, in react you indeed should write it with camelCase, line onClick, but your code is probably not converted from jsx to js, so you need onclick. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Is Cockpit not connected to the server? When calling cockpit.file, it actively connects to the server |
Beta Was this translation helpful? Give feedback.
-
Explain what happens
I developed a component using React;
But it does not take effect and there are no errors or information prompts.
Other API methods can be used, such as cockpit.location
Version of Cockpit
264-1ubuntu0.22.04.1~bpo20.04.1
Where is the problem in Cockpit?
None
Server operating system
Ubuntu
Server operating system version
No response
What browsers are you using?
Firefox
System log
No response
Beta Was this translation helpful? Give feedback.
All reactions