Mouse Cursor disappearing when using JavaScript (Leaflet.js)

463 views
Skip to first unread message

Josef Seibl

unread,
Sep 24, 2013, 4:03:46 PM9/24/13
to cefs...@googlegroups.com
When using CefSharp in a windows forms app, the mouse cursor disappears if it is over the control.

You should be able to reconstruct this:
  1. Save the minimal html file provided (attached and cited)
  2. Execute the CefSharp Windows Forms Demo
  3. Enter the local address of this file in the address bar
  4. Press Enter
  5. Now, when entering with the mouse, the mouse cursor should disappear
  6. The funny thing is, the cursor does reappear when hovering over the zoom-buttons in the upper left corner.
Minimal html:
<!DOCTYPE html[]>
<html lang="de">
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
    <title>No cursor sample</title>
    <script type="text/javascript">
      function init () {
        map = L.map('map').setView([45.80949, 11.05501], 13);
      }
    </script>
  </head>
  <body onLoad="javascript:init();">
    <div id="map" style="height: 100%; width: 100%;"></div>
  </body>
</html>

(Note: you are probably not seeing any map tiles, because no tile-layer was added, nevertheless, the example shows the disappearing mouse cursor).

The Mouse cursor does not disappear when trying this sample in a desktop browser. 


Best
Josef



map.html

Josef Seibl

unread,
Sep 24, 2013, 4:34:27 PM9/24/13
to cefs...@googlegroups.com
Sorry, just after I posted this I had some more Ideas. After debugging, it shows that the cursor is set to
cursor: -webkit-grab;


which results in an invisible cursor. You can circumvent the error in this case by overriding the cursor property, e.g. in my case:
.leaflet-container {
cursor: move !important;
}
Reply all
Reply to author
Forward
0 new messages