IE 10 Text Box Clear Button Covers Text

When working on a project that required quantities to be entered into a text box and displayed aligned to the right of the text box, I ran across a peculiar issue. If the text box had focus, a new button appeared in the text box that would allow the user to completely clear the contents of the text box. When focus moved to another element on the page, the clear button disappeared, but part of the right side of the text that was previously displayed in the text box disappeared as well. If you were to inspect that element’s value via JavaScript, you would discover that the data was still intact, and that only its display was affected.

Unfortunately, the only way to reproduce these symptoms was to view the site in Internet Explorer 10. It seems that others have had this sort of issue before, entirely in IE10. I have attempted to reproduce the issue with IE11 to no avail as it seems that Microsoft was able to correct this bug before they released the latest version of their browser. There is a workaround that should help hide the text box clear button whether the field has focus or not.

If you want to hide the clear button for all text-boxes, you can use the following CSS, and customize it to fit your needs.

input[type="text"]::-ms-clear {
    display: none;
}
comments powered by Disqus

Related Posts

Google Analytics Site Speed is a bit Unreliable

Google Analytics will now allow site owners to track the performance of their websites with real live traffic. This is a nice feature that lets you understand just how long it takes for the average visitor to your site to see the fully complete version of your website. While this sounds like a great tool that will give you an accurate view of yoru website’s performance, it does not tell the full story.

Read More

Unexpected Results with SQL Server and Python pyodbc

Using the Microsoft SQL Server Management Studio (SSMS) with SQL Server hides many of the API complications that can sometimes arise when working with SQL Server. One specific example would be when using Python on Windows with the pyodbc driver. If you have an update statement that performs a simple update to a status column and a datetime column, you can have some unexpected results. Lets say that the table you are running the update against has a before update trigger and an after update trigger configured on it.

Read More

Window.Open Causes Browser Compatibilty Issues

One of the things that always annoys me as a web developer is when native browser functions that are accesible from JavaScript do not share the same function signature. One perfect example of this is the window.open function. When you are using non-Microsoft browsers such as Firefox and Chrome, you are able to make a call something like this window.open(url, 'window name', 'dimensions or other settings');. The window name parameter is important because it allows you to open multiple links in the same external window/tab.

Read More