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
Developer
n_jay144
Posts: 68
Registered: ‎09-05-2012
My Device: Z10 Red, PlayBook, DevAlpha C
My Carrier: Play
Accepted Solution

Problem with hover state in BB10

Hi,

After upgrading my DevAlpha A to the latest version, 10.0.9.1675, I have problems with 2-state buttons.

Sample code:

#myBtn{
	background-image: url(btn/myBtn.png);
	background-repeat: no-repeat;
	background-position: 0px 0px;
}
#myBtn:hover{
	background-position: 0px -124px;
}

So, when I click the button, it stay freezed up in hover state, doesn't return to default position. All my ww apps are touched by this issue.

 

Can anybody try to reproduce this issue?

If yes, what is solution?

 

Please use plain text.
Developer
biggerCC
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Re: Problem with hover state in BB10

This is somehow the standard :hover behavior I noticed in mobile browsers. Since is no cursor, hovering is only simulated...

The easiest solution (and the one I use in my projects) is to use :active instead of :hover.

 

#myBtn:active{
	background-position: 0px -124px;
}

 

- - -
My approved apps @ App World
Please use plain text.
Developer
n_jay144
Posts: 68
Registered: ‎09-05-2012
My Device: Z10 Red, PlayBook, DevAlpha C
My Carrier: Play

Re: Problem with hover state in BB10

Hi biggerCC

Thanks a lot . Now It works fine.

Please use plain text.