I have an issue where I have box that is kind of like a live feed and updates constantly. This live feed has overflow-y: scroll and I use scrollTop to bring them to the bottom of the container.
However if clicks on the select box it will automatically get closed when the live feed is updating and scrollTop is called.
This seems to only be broken in Chrome (Version 27.0.1453.110 m) It works correctly in IE, FF, Opera, Safari.
You can view the example here, click on the select box and wait for the other box to start scrolling, the select box will lose the dropdown: http://jsfiddle.net/xa3D2/2/
HTML
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<div id="scrollBox">
</div>
JS
function addContent()
{
$('#scrollBox').append('<div>');
$('#scrollBox').scrollTop($('#scrollBox').prop('scrollHeight'));
setTimeout(addContent,500);
}
setTimeout(addContent,500);
CSS
#scrollBox {
border: 1px solid #ccc;
overflow-y: scroll;
word-wrap: break-word;
background: #fff;
color: #000;
text-align: left;
position: absolute;
top: 50px;
left: 0;
right: 0;
width: 100px;
height: 300px;
}
#scrollBox div {
height: 50px;
border: 1px solid #00f;
}
I guess my question would be is this a Chrome bug? Is there a possible way around this?