Skip to content

loses control when alert #257

Open
Open
@yutanoma

Description

@yutanoma

Hi,

I've been using dat.gui and wrote a code below.

gui.add(control, 'thickness', 1, 3).onChange(() => {
  alert('a')
})

As a result, the browser became to show the alert continuously, and it became impossible to break the loop except closing the tab of the browser.

Also, I tried to make a deadtime using setTimeOut using the code below.

let isDeadTime = false

gui.add(control, 'thickness', 1, 3).onChange(() => {
  if (!isDeadTime) {
    isDeadTime = true
    alert('a')
    setTimeout(() => isDeadtime = false, 1000)
  }
})

Then, I found out that when I move the cursor, the value on the slider will also change. I am not clicking or tapping the trackpad when I am moving the cursor. See this video FYI.

I am using Google Chrome v78.0 on a MacBook Pro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions