I have an onmouseover for the cells on a table. In the following example I printout the content of the <td>
element. If I set the focus in the <input>
element and than I press and I hold the left mouse button and go over another cell the currentTarget remain the same.
This is happening in Microsoft Edge, in Chrome I get the printout of the cell over which the mouse is positioned, as expected.
$('#tableProperties').on('mouseover','.mycell', tdMouseover);
function tdMouseover(e) {
var mycell = e.currentTarget;
console.log("myCell: "+mycell.textContent);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table width="500px" id="tableProperties">
<tr><td class="mycell"><input value="Cell 1"></input></td></tr>
<tr><td class="mycell">Cell 2</td></tr>
<tr><td class="mycell">Cell 3</td></tr>
<tr><td class="mycell">Cell 4</td></tr>
<tr><td class="mycell">Cell 5</td></tr>
<tr><td class="mycell">Cell 6</td></tr>
</table>