Stop browser to go back with the delete key

Get help using Construct 2

Post » Wed Jan 16, 2013 12:20 pm

Normally the browser moves 1 site back if you press delete. Is there a way to disable that ?
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Thu Jan 17, 2013 9:19 am

No ideas ?
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Thu Jan 17, 2013 9:57 am

The problem is, I made my own textbox, there we user can write some text. But if he trys to delete a char it returns a site back.
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Thu Jan 17, 2013 10:04 am

What's your browser ?
If the focus in on a text box, it isn't supposed to go back to the previous page.

At worst, add a keyboard object and add a blank "On 'backspace' key pressed" event.
It should catch the key and cancel the normal usage of the key.

Also, be sure to use the "Edit post" in "Post options".
Bumping the thread after 24 hours is OK, but if you want to add more informations to a previous post, editing it is a better fit.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu Jan 17, 2013 11:56 am

Sorry for bumping,

Im not using the text box plugin.

I made my own. I will try to make On "backspace" event and tell you if it works.


"At worst, add a keyboard object and add a blank "On 'backspace' key pressed" event.
It should catch the key and cancel the normal usage of the key."

-Does not work for me





Edit3: Added a simple console.log to the action and it works localboss2013-01-17 12:04:43
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Thu Jan 17, 2013 1:02 pm

The Keyboard manual entry describes how using an empty 'On key press' event blocks the browser default action. If that does not work try sharing your .capx.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Jan 17, 2013 2:48 pm

Got it already, but thank you ashley. Don't thought that I don't know the whole manual :D
B
15
S
6
G
6
Posts: 512
Reputation: 5,550


Return to How do I....?

Who is online

Users browsing this forum: makkancs, Matthew de and 36 guests