Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
rebootln
Posts: 25
Registered: ‎05-10-2011
My Device: PB
My Carrier: TELUS

Problem with HTML search form on PB and Z10

We have a page on intranet that doesn't work with blackberry 10 devices

 

the java script is 

 

function checkEnterKey(e) {

        var key = window.event ? e.keyCode : e.which;      

        

        if (key == 13) {

            startSearch();

            return false;

        }

 

        return true;

    }

 

 

does anyone know what is the key code for blackberrys "submit" on the keyboard?

 

if we have a field that you type text and then click on a submit button that works.

 

 

Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Problem with HTML search form on PB and Z10

Try (key == 13 || key == 10)

But could it be that your button is intercepting the event and not bubbling it up to "window"?

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Contributor
rebootln
Posts: 25
Registered: ‎05-10-2011
My Device: PB
My Carrier: TELUS

Re: Problem with HTML search form on PB and Z10

tried both 10 and 13

 

if we do js alert and type "a" a pop uyp comes up with 97

 

but if you hit enter - page reloads

 

Please use plain text.
Contributor
rebootln
Posts: 25
Registered: ‎05-10-2011
My Device: PB
My Carrier: TELUS

Re: Problem with HTML search form on PB and Z10

also , no java script alert for backspace either - it jsut deletes the character...
Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Problem with HTML search form on PB and Z10

It's strange because I just did a test and backspace was detected as keycode 8.

The reloading of the page may suggest that you're "posting" the form instead of processing it via Javascript. I had a similar issue in one app on the PlayBook, I'll try to see if I can find out more about the issue we had.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Contributor
rebootln
Posts: 25
Registered: ‎05-10-2011
My Device: PB
My Carrier: TELUS

Re: Problem with HTML search form on PB and Z10

if you could find out what it was it would be very helpfull as we could get rid of the "GO" button. :smileyhappy:

 

 

Please use plain text.
Contributor
rebootln
Posts: 25
Registered: ‎05-10-2011
My Device: PB
My Carrier: TELUS

Re: Problem with HTML search form on PB and Z10

any word on this ? 

 

we still have this issue and it's very frusturating :smileysad:

Please use plain text.