Skip to content

fix(api.js): expose fileDropEnabled in WebviewWindow constructor #2968

@wesin

Description

@wesin

when i create a new WebviewWindow. the h5 drag & drop is not supported

    const webview = new WebviewWindow(e.id, {
      url: '/#/expDesign',
      center: true,
      title: e.name,
    });
    webview.once('tauri://created', function () {
      console.log('new window');
    });

but if i use navigate the page it works.

  const openWebUrl = () => {
    navigate('/expDesign');
  };

so maybe thie fileDropEnabled is not suppert the multiwindos.

but my destination is to create a new WebviewWindow.
i have set the fileDropEnabled:fase in the tauri.conf.json

my enviroment is

  • win10
  • "react": "^17.0.2",
  • "@tauri-apps/api": "^1.0.0-beta.8",

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