views:

15

answers:

2

Hi everybody. I have a strange problem with hover in Opera browser. Here's the test case:

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
    <title>opera hover issues</title>
</head>

<style>
    .item {
        background-color:pink;
        border:1px solid red;
        color: maroon;
        height:100px;
        width:300px;
    }   

    .item a { 
        display:none;
    }   

    .item:hover a{
        display:block;
    }   

    .item a:hover {
        font-weight:bold;
        background-color: yellow;
    }   
</style>

<body>
    <div class="item">
        an item - 0 
        <a href="javascript:void(0)">remove</a>
    </div>
    <div class="item">
        an item - 1 
        <a href="javascript:void(0)">remove</a>
    </div>
    <div class="item">
        an item - 2 
        <a href="javascript:void(0)">remove</a>
    </div>
</body>

<script>
    document.onclick = function(evt) {
        var el = evt.target;
        if (el.nodeName == 'A') {
            var to_remove = el.parentNode;
            to_remove.parentNode.removeChild(to_remove);
        }
    }
</script>

Try to click first item's "remove" link As you will be able to see, in Opera (at least in Opera 9.61) сss-defined hover does not trigger till mouse is moved.

Has anyone tried to solve this issue?

thanks in advance!

A: 

i've already tried to - - Force onscroll trigger, calling window.scrollBy; - Force reflow/redraw via hiding/showing the element; - Set marginTop and resetting it to the default value.

Helas, the problem remains (

shabunc
A: 

Interesting case. I don't have an answer to this, but I would like to ask you to report a bug to Opera on https://bugs.opera.com/wizard/ if you haven't already.

hallvors