1 (edited by jakobdo 2012-02-28 10:35:28)

Topic: Handle ESC

Hello,
i have been testing this plupload, and it works just perfect. (almost) smile

Can i somehow detect if the user push ESC doing an upload?

Re: Handle ESC

You would have to write your own keyboard event handler, but there is no reason that you couldn't do that.  It wouldn't have anything to do with plupload though - just plain old JavaScript and keyboard events.

Re: Handle ESC

mike wrote:

You would have to write your own keyboard event handler, but there is no reason that you couldn't do that.  It wouldn't have anything to do with plupload though - just plain old JavaScript and keyboard events.

But the ESC, will terminate / stop the upload. So i hoped plupload would fire a event like: Terminated / user_abort or something.

Re: Handle ESC

As I mentioned you would have to write your own event handler.  You can make that handler do whatever you'd like - including stopping the upload, etc.

Re: Handle ESC

Mike: Maybe I'm not that good in english. But if i start an upload with plupload now, and push ESC, the upload will stop. (without me own code). So I guess the esc = stop upload is already implemented.

Re: Handle ESC

My apologies, I wasn't aware of that behaviour as I only use the core custom upload components.  I assume you are using one of the widgets?

Re: Handle ESC

tried using esc on the widgets samples on the plupload site and the upload wasn't stopped.

Re: Handle ESC

I think it is default Jquery / browser behaviour.
If you "load" a page, and push ESC, it will stop loading the page. Think it is the same with ajax calls.

I have the "problem" in HTML5.
Will test in flash, silverlight etc.