Some Android devices experience unusual behavior with inlined icon links

Check out this small jsFiddle:

<html>
  <head>
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <style>
      .navButton {
        font-size:30px;
        height:43px;
        text-align: center;
      }
    </style>
  </head>
  <body>
    <div style="display:inline-block">
      <a class="navButton" href="#"><i class="fa fa-camera"></i></a>
      <a class="navButton" href="#"><i class="fa fa-camera"></i></a>
      <a class="navButton" href="#"><i class="fa fa-camera"></i></a>
    </div>
    <div style="display:inline-block">
      <a class="navButton" href="#">Bla</a>
      <a class="navButton" href="#">Bla</a>
      <a class="navButton" href="#">Bla</a>
    </div>
  </body>
</html>

The jsFiddle works well on most browsers, except for the native browsers on LG G2 and Galaxy Note 2 phones. In these cases, clicking on the right camera links results in a white rectangle covering part of the icon to the left, like this:

When inspecting the issue using chrome://inspect, there are no changes in CSS properties when the link is clicked. There are no margin or padding colorings visible in the elements. The white rectangle appears when any of the three states are forced (:active, :hover, :focus).

Is this a bug? If so, is there a way to prevent this issue while maintaining the same rendering?

It seems that the defect is not actually a white overlay, but rather covers icons with "transparency," as demonstrated in this image with a background-color: red on the body:

Answer №1

After reading through this post, I discovered the solution to my problem. Following the advice given in the answer, I was able to resolve the issue by adjusting the order of the font files in my CSS code, ensuring that the SVG file was placed at the forefront:

@font-face {
  font-family:'FontAwesome';
  src:url('/font-awesome/fonts/fontawesome-webfont.eot');
  src:url('/font-awesome/fonts/fontawesome-webfont.svg#fontawesomeregular') format('svg'),url('/font-awesome/fonts/fontawesome-webfont.eot?#iefix') format('embedded-opentype'),url('/font-awesome/fonts/fontawesome-webfont.woff2') format('woff2'),url('/font-awesome/fonts/fontawesome-webfont.woff') format('woff'),url('/font-awesome/fonts/fontawesome-webfont.ttf') format('truetype');
  font-weight:normal;
  font-style:normal;
}

If you decide to customize the font in your own CSS rather than modifying the original Fontawesome CSS file (which may not be advisable due to potential updates in the future), be sure to update the file paths accordingly.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Interactive canvas artwork featuring particles

Just came across this interesting demo at . Any ideas on how to draw PNG images on a canvas along with other objects? I know it's not a pressing issue, but I'm curious to learn more. ...

Place your cursor over the following element to take control

There is a paragraph that needs to be clipped when hovered over. An issue arises where the H1 text shifts its position. Only the phrase "HOVER ABOVE PARAGRAPH" should be concealed. * { margin: 0; box-sizing: border-box; } .wrapper { displ ...

Removing the currently selected item from the OwlCarousel

I am trying to enable users to delete the item that is currently active or centered in an OwlCarousel. I have come across some code related to deleting items, but it seems to be a rare question: $(".owl-carousel").trigger('remove.owl.carous ...

How do I customize the default styling of a single slider in react-slick?

Looking to enhance the look of slick carousels by customizing prev/next arrows and controlling their position? I'm currently using nextjs13, chakra-ui, react-slick, and vanilla extract. An effective way to customize arrow styles is by passing an arro ...

What is the best way to change the value of a div using JavaScript?

i could really use some assistance, i am trying to ensure that only the selected template is shown on the screen, while all others are hidden. The expected outcome should be to replace the values of: <div class="city">City<span>,< ...

Is there a way to log and process div data posted using jQuery in CSS format?

I am looking to extract and log a JavaScript-calculated result from an anonymous survey created using a WordPress plugin. The generated HTML code is: <div ref="fieldname57_1" class="cff-summary-item"> <span class="summary-field-title cff-summary ...

Verify the placement within the text box

Are there methods available in JavaScript or any JavaScript framework to determine the position within a textbox? For example, being able to identify that figure 1 is at position 2 and figure 3 is at position 3. Figure 1 Figure 2 ...

List items out of place because of CSS incompatibility in Firefox and Chrome

After creating a list of names displayed in an <ul>, I implemented some CSS styling only to encounter browser-specific issues. In Chrome: The list element is shifted by one row. In Firefox: All list items are collapsing into one item. Here&apo ...

The HTML element seems to be missing its height parameter

My element doesn't have a set height, but it's populated with images causing the Anchor around the images to be unclickable unless I assign a fixed height to .portfolio. Any ideas on how to resolve this? HTML Snippet : <h1 class="text-c ...

What is causing the div to expand even though css max-width is applied?

I am currently facing an issue with the navigation on mobile view while using Bootstrap 4. Specifically, the .nav .dropdown-menu and .text-truncate classes are not displaying ellipsis when the content text length is too long. I have attempted to resolve t ...

Navigating the complexities of my android layouts has left me feeling befuddled

Currently, I am working on an application that is designed to support various screen resolutions. However, I have encountered a significant issue with my layouts. Here's the problem: In my res folder, I have two subfolders labeled "layout" and "layou ...

An easy way to adjust the date format when linking a date in ng-model with md-datepicker

<md-input-container> <label>Scheduled Date</label> <md-datepicker ng-model="editVersionCtrl.selectedPlannedDate" ng-change="editVersionCtrl.checkPlannedDate()"> </md-datepicker> </md-input-container> ...

Is there a way to restrict keyboard input on this date picker?

Can you review the following link and let me know which properties or events I should utilize in this scenario? https://codesandbox.io/s/charming-frost-qrvwe?file=/src/App.js ...

Using an inline-block within a positioned absolute element

I am curious about the behavior of inline-block elements inside absolutely positioned elements. To better explain, I have provided an example below. We can see in the code snippet why the .icon within the .tag is not displayed like the previous .icon (whic ...

What is the best way to customize the appearance of the material-ui select component using styled-components instead of material-ui classes in a React

I've been facing some challenges while trying to style my material-ui select component using styled-components instead of material- classes. The version I am working with is material-ui/core 4.12.3. When I use the old makeStyles component from materi ...

When viewing a webpage on a small browser, the content will automatically expand to fill the

Attempting to utilize responsive CSS media queries to hide the sidebar unless the screen is large or a tablet big enough in landscape mode. It appears to be functioning properly while resizing the browser, but at a certain size, it occupies the entire scre ...

Compel the browser to initiate a reflow by adjusting the CSS

I am currently in the process of building a responsive image slider without relying on jQuery, using CSS3 transitions. The setup is quite simple: there's a viewport with a UL inside, containing relatively positioned LIs that are left floated. Howeve ...

is it possible to adjust the height of a tableRow in mui?

I recently created a table component using Mui. I've been attempting to adjust the height of the tableRows, but so far I haven't had any success. Below is my code snippet: import React, { memo } from "react"; import { ActionItemType, ...

Why are the names and emails switched in my Firebase store?

I'm running into an issue with firebase where every time I create a new account, the email gets placed in both the name and email fields. Is there a solution to this problem? I've included an image to illustrate my point and am more than willing ...

Having trouble with the scrolling feature on a read-only text area within a form

My form allows users to input their data, but once submitted, the form becomes read-only. However, I'm facing an issue where the data in the text area is not scrollable even though it should be. I need assistance in figuring out why the content in th ...