Skip to content

Canvas not displaying after hiding and showing with ScaleViewport true #1938

Open
@tingyuguanhe

Description

Describe the bug
A clear and concise description of what the bug is.
Setting scaleViewport to true, after the element bound to the rfb object is set to display: none, and then it is shown again, the width and height of the canvas are both 0, causing the canvas to be unable to display.

Expectation: The canvas can be displayed normally after being hidden with display: none and then shown again.

To reproduce
Steps to reproduce the behavior:

  1. Connect to a VNC server
  2. Set style display: none
  3. Set style display: block
  4. The width and height of the canvas are both 0,causing the canvas to be unable to display.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Client (please complete the following information):

  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Browser version: [e.g. 22]

Server (please complete the following information):

  • noVNC version: 1.5.0
  • VNC server: [e.g. QEMU, TigerVNC]
  • WebSocket proxy: [e.g. websockify]

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions