0 Replies Latest reply on Oct 28, 2011 6:01 AM by IbrahimJ.Peter

    Prevent drag'n'drop for web viewer

    IbrahimJ.Peter

      Title

      Prevent drag'n'drop for web viewer

      Post

      Hi all,

      the web viewer is a really cool feature.

      Using a plugin like MBS you have almost no limits do design user interfaces, especially navigations, and call back FM scripts when the user performs a special action like clicking a button on the web viewer.

      But what happens when the user drops a file from his desktop to the web viewer?

      If you prohibit interaction with the wv - nothing. But in this case you can't use it for navigation.

      If you don't prohibit interaction the dropped file will be shown in the wv and your navigation has gone.
      You could install an onunload handler in the HTML/JS navigation, call a FM script that loads the navigation back. But onunload will be triggered when the unload happens and for a second the user can see his file. This is not nice but somehow you could live with. Unfortunately there is an onbeforeunload handler in JS. If the file dropped by the user contains it he will be asked if he wants to keep his page loaded.

      If he knows or guesses the names of some scripts of your solution he could easily call them with JS. This is something I don't want to live with.

      Does anybody know how I can allow interaction with the wv but prohibit drag'n'drop for it?

      Thanks a lot

      Ibrahim