Skip to content

Commit

Permalink
Bug 1262755 - Enlarge caret touch target by 59% for Fennec. r=capella…
Browse files Browse the repository at this point in the history
…,snorp

Enlarge the touch target of the caret to the left, bottom, and right by
59% (13px) per bug 1262755 comment 7.

Since the touch target becomes larger, the carets on the <input> in
previous test might cause the next test to fail on <textarea> because it
will press on the caret when trying to focus on <textarea>. Add <br>
elements to testAccessibleCarets.html to separate these test fields.

MozReview-Commit-ID: JIwmuHJ2QsQ
  • Loading branch information
aethanyc committed Apr 22, 2016
1 parent 842f4fb commit 2213e38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion layout/style/res/ua.css
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ div:-moz-native-anonymous.moz-accessiblecaret > div.image {
background-position: center bottom;
background-size: 100%;
background-repeat: no-repeat;
bottom: 0;
background-origin: content-box;
top: 0;
width: 100%;
height: 100%;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<input id="LTRinput" style="direction: ltr;" value="Type something">
<input id="RTLinput" style="direction: rtl;" value="לרוץ במעלה הגבעה">
<br>
<br><br><br>

<textarea id="LTRtextarea" style="direction: ltr;"
rows="3" cols="8">Words in a box</textarea>
Expand All @@ -38,7 +38,7 @@
<br>
<input id="RTLphone" style="direction: rtl;" size="40"
value="התקשר +972 3 7347514 במשך זמן טוב">
<br>
<br><br><br>
<div><input value="DDs12">3 45<em id="bug1265750"> 678</em> 90</div>

</body>
Expand Down
8 changes: 8 additions & 0 deletions mobile/android/themes/core/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,14 @@ input[type=number]::-moz-number-spin-box {
display: none;
}

div:-moz-native-anonymous.moz-accessiblecaret > div.image {
/* border: 0.1px solid red; */ /* Uncomment border to see the touch target. */
padding-left: 59%; /* ((48-22)/2)px / 22px ~= 59% */
padding-bottom: 59%;
padding-right: 59%;
left: -59%;
}

/* Override accessiblecaret css in layout/style/ua.css */
div:-moz-native-anonymous.moz-accessiblecaret.normal > div.image {
background-image: url("chrome://browser/skin/images/accessiblecaret-normal-hdpi.png");
Expand Down

0 comments on commit 2213e38

Please sign in to comment.