Skip to content

Javascript alert windows works on Mac but not on Windows #848

@xudesheng

Description

@xudesheng

Describe the bug
alert works on Mac but not on Windows after yarn tauri build

To Reproduce
Steps to reproduce the behavior:

  1. Using following code
useEffect(()=>{
        return ()=>{
            alert("Item about to be deleted!");
        }
    },[]);
  1. Before using Tauri to build, this alert works both on Windows and Mac as expected.
  2. After using Tauri to build, this alert only works on Mac but not on Windows.

Expected behavior
Expect a consistent result.

Screenshots
Screenshot can be found at: https://github.com/xudesheng/mytodo

When you click delete, you can see an alert windows pops up on Mac but not on Windows.

Mac:
https://github.com/xudesheng/mytodo/blob/master/docs/_image/2020-07-17_21-52-02.gif

Windows:
https://github.com/xudesheng/mytodo/blob/master/docs/_image/7-17-2020%209-43-32%20PM.gif

Platform and Versions (please complete the following information):

Mac:
`
[tauri]: running info

Operating System - Darwin(19.5.0) - darwin/x64

Node.js environment
Node.js - 14.4.0
tauri.js - 0.9.1

Rust environment
rustc - 1.45.0
cargo - 1.45.0
tauri-bundler - 0.8.5

Global packages
NPM - 6.14.6
yarn - 1.22.4

App directory structure
/.git
/build
/docs
/node_modules
/public
/src
/src-tauri

App
tauri.rs - 0.7.5
mode - embedded-server
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'
Windows - Edge
distDir - ../build
devPath - http://localhost:3000/
`

Windows:
`
[tauri]: running info

Operating System - Windows_NT(10.0.18363) - win32/x64
Microsoft Edge - 44.18362.449.0_neutral__8wekyb3d8bbwe

Node.js environment
Node.js - 12.18.2
tauri.js - 0.9.1

Rust environment
rustc - 1.45.0
cargo - 1.45.0
tauri-bundler - 0.8.5

Global packages
NPM - 6.14.5
yarn - 1.22.4

App directory structure
/.git
/build
/docs
/node_modules
/public
/src
/src-tauri

App
tauri.rs - 0.7.5
mode - embedded-server
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'
Windows - Edge
distDir - ../build
devPath - http://localhost:3000/
Done in 1.91s.
`
Additional context
Add any other context about the problem here.

Stack Trace

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