ios - iphone version of ion-button focus background doesn't change + IONIC2 -
i using button , on android if tap button background converts blue black , color converts yellow white. in ios build when tap background doesn't stay black. when finger leave screen comes original state.
<button ion-button block round outline color="danger" (click) = "gotonextwithparent()"> parent </button> button:focus{ background:#000; color:#ffffff; }
according mdn:
safari 7.0.5:
- clicking on
<button>
does not give focus,tabindex
- clicking on
<a>
give focus, only when hastabindex
ios 7.1.2
- tapping on
<button>
does not give focus,tabindex
- tapping on
<a>
give focus, only when hastabindex
so, according above, have no luck on giving focus on button
, should instead, use anchor
, give focus.
a { appearance: button; -moz-appearance: button; -webkit-appearance: button; text-decoration: none; color: buttontext; display: inline-block; padding: 2px 8px; border: 1px solid black; } button:focus, a:focus { background: #000; color: #ffffff; }
<button>a button</button> </br> </br> <a href="#" onclick="event.preventdefault()" tabindex="1">an anchor</a>
jsbin check on ios (tested on ios 10.3.3)
information on mdn:
Comments
Post a Comment