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

Java Development

Posts: 174
Registered: ‎01-25-2011
My Device: Not Specified

Back button functionality in browser field

[ Edited ]

Hi all,

I have loads of html pages to be loaded in my browser field, in which i have used keyChar method to recognize the back button pressed by the user to navigate to the previous pages using the browserHistory's goBack() method.


Every thing worked fine until i came across device with some bundle no. 2921 in blackberry 9800, where the function goBack() is not working. Even the checkGoBack() method is returning false despite having html pages below the current one. 


Apart from the above bundle they are few more bundles where those two methods are not working as expected. I even tried using browserField's back() method but with no luck. I have also tried the same app in 9700 with bundle no 1879, even that has failed to work.


But the best part is, the app is working properly on all os 7.0 bundles like 9900 device. 


The problem is with os 6.0 Latest bundles as on the bundle n0. 695 device it is working fine again.


Developed on OS 6.0

Ported on OS 6.0 n above(7.0)


The code snippet that i have used is below:


protected boolean keyChar(char key, int status, int time) {
		if (key == Characters.ESCAPE) {
			Application.getApplication().invokeLater(new Runnable() {
				public void run() {

					if (browserField.getHistory().canGoBack())

			return true;

		return super.keyChar(key, status, time);