Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor is captured by Properties and Console #1318

Closed
abhisekp-impeller opened this issue Dec 30, 2022 · 4 comments
Closed

Cursor is captured by Properties and Console #1318

abhisekp-impeller opened this issue Dec 30, 2022 · 4 comments
Labels
bug Something isn't working intellij

Comments

@abhisekp-impeller
Copy link

Describe the bug

When I open previewjs in any component, it captures the cursor and I no longer able to type or see the cursor in the Webstorm editor.

Reproduction

  1. Write any component
  2. Open the PreviewJS
  3. Try to type anything in the Webstorm. You're unable to type. No cursor is shown.

Preview.js version

v1.17.0

Framework

React 18.2.0

System Info

System:
    OS: Linux 5.14 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 4.01 GB / 15.38 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 19.3.0 - ~/.nvm/versions/node/v19.3.0/bin/node
    npm: 9.2.0 - ~/.nvm/versions/node/v19.3.0/bin/npm
  IDEs:
    Android Studio: AI-213.7172.25.2113.9014738
    Nano: 4.8 - /usr/bin/nano
    VSCode: 1.74.2 - /usr/bin/code
    Vim: 0.7.2 - /usr/bin/vim
  Browsers:
    Chrome: 108.0.5359.124
    Firefox: 108.0

Used Package Manager

npm

Preview.js logs (check bottom panel in IntelliJ)

Reverting to nvm default version
Now using node v19.3.0 (npm vNow using node v19.3.0 (npm v9.2.0)
9.2.0)
Now using node v19.3.0 (npm v9.2.0)
[ready] Preview.js daemon server is now running at http://localhost:37263
Creating Preview.js workspace (plugin: @previewjs/plugin-react) at /home/abhisek/Projects/Impelsys/react-router
Preview.js initialised for project react-router
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
__previewjs__/Wrapper.tsx:
Variable declaration list cannot be empty.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
__previewjs__/Wrapper.tsx:
Cannot find name 'v'.
Preview.js Server running at http://localhost:3141.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
vite.config.ts:
Binding element 'mode' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Cannot find name 'useRouteLoaderData'.
Cannot find name 'Product'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Binding element 'name' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Cannot find name 'int'. Did you mean 'Intl'?
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Member 'name' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Member 'availab' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Member 'availability' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Member 'im' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Binding element 'pri' implicitly has an 'any' type.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Cannot find name 'Func'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type '({ name, pri }: {}) => void' is not assignable to type 'FunctionComponent<{}>'.
Property 'name' does not exist on type '{}'.
Property 'pri' does not exist on type '{}'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type argument list cannot be empty.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type '({ name, pri }: ProductViewProps) => void' is not assignable to type 'FunctionComponent<ProductViewProps>'.
Property 'pri' does not exist on type 'ProductViewProps'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type '({ name, price, }: ProductViewProps) => void' is not assignable to type 'FunctionComponent<ProductViewProps>'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type '({ name, price, image, }: ProductViewProps) => void' is not assignable to type 'FunctionComponent<ProductViewProps>'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type '({ name, price, image, availability, }: ProductViewProps) => void' is not assignable to type 'FunctionComponent<ProductViewProps>'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type '({ name, price, image, availability, description }: ProductViewProps) => void' is not assignable to type 'FunctionComponent<ProductViewProps>'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Cannot find name 're'.
Warning: encountered some TypeScript error(s) while resolving types.
This may be safe to ignore, but could help point out why some components are not detected by Preview.js.
src/components/ProductView.tsx:
Type 'boolean' is not assignable to type 'string'.
1:29:41 AM [vite] hmr update /@component-loader.js?p=src%2Fpages%2FIndex.tsx&c=Index, /@component-loader.js?p=src%2Fpages%2FRoot.tsx&c=Root, /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:29:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:29:50 AM [vite] hmr update /@component-loader.js?p=src%2Fpages%2FIndex.tsx&c=Index, /@component-loader.js?p=src%2Fpages%2FRoot.tsx&c=Root, /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:16 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:19 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:19 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:43 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:45 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:48 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:48 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:48 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:48 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:48 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:49 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:49 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:49 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:49 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:49 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:49 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:50 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:30:51 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:31:21 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:35:26 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:35:26 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:35:26 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:35:27 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:38:28 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:38:28 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:38:28 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView
1:38:30 AM [vite] hmr update /@component-loader.js?p=src%2Fcomponents%2FProductView.tsx&c=ProductView

Browser logs (useful for rendering errors)

No errors

Repo link (if available)

No response

Anything else?

Check below gif

Preview-JS-Cursor-Capture-2022-12-31-01-38.gif

@fwouts
Copy link
Owner

fwouts commented Dec 30, 2022

Hey @abhisekp-impeller, thanks for the report. Which version of WebStorm are you using?

@abhisekp-impeller
Copy link
Author

abhisekp-impeller commented Jan 2, 2023

@fwouts

WebStorm 2022.3.1
Build #WS-223.8214.51, built on December 20, 2022

Runtime version: 17.0.5+1-b653.23 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.14.0-1054-oem
GC: G1 Young Generation, G1 Old Generation
Memory: 1968M
Cores: 8
Registry:
    debugger.watches.in.variables=false
    suggest.all.run.configurations.from.context=true

Non-Bundled Plugins:
    berezhkoe.cognitivecomplexity (0.0.2)
    cc.duduhuo.git-conflict (1.0.4)
    com.nasller.CodeGlancePro (1.5.9)
    com.kiexujiaqi.func-comment (1.3-SNAPSHOT)
    DBN (3.3.5889.0)
    ai.codegeex.plugin (1.0.5)
    com.github.copilot (1.1.38.2229)
    com.intellij.ideolog (203.0.30.0)
    com.markskelton.one-dark-theme (5.7.2)
    com.intellij.jira (4.3.0)
    String Manipulation (9.6.1)
    com.arcticicestudio.nord.jetbrains (0.13.0)
    indent-rainbow.indent-rainbow (2.1.0)
    com.wakatime.intellij.plugin (14.1.3)
    ski.chrzanow.foldableprojectview (1.1.4)
    ru.adelf.idea.dotenv (2022.3)
    org.igu.plugins.bettercomments (1.0)
    com.intellij.grazie.pro (0.3.200-223)
    io.kanro.idea.plugin.protobuf (1.6.30)
    com.atlassian.bitbucket.references (2022.1.220)
    com.intellij.lang.jsgraphql (3.3.0)
    mdx.js (223.8214.16)
    zielu.gittoolbox (213.10.5)
    mobi.hsz.idea.gitignore (4.4.4)
    com.previewjs.intellij.plugin (1.17.0)
    izhangzhihao.rainbow.brackets (2023.1.0)

Current Desktop: ubuntu:GNOME

@fwouts fwouts added bug Something isn't working and removed pending triage labels Jan 3, 2023
@fwouts
Copy link
Owner

fwouts commented Jan 3, 2023

Thanks @abhisekp-impeller. At this stage I'm wondering if this isn't a bug in WebStorm itself, but I'll see if I can find a workaround.

@fwouts
Copy link
Owner

fwouts commented Apr 28, 2023

I haven't been able to reproduce, so closing this. It's possible that upgrading WebStorm will fix it, or perhaps the bug was inadvertently fixed with recent changes to the Preview.js plugin.

@fwouts fwouts closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working intellij
Projects
None yet
Development

No branches or pull requests

2 participants