Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Prevent the default click behavior and the passing to other elements …
Browse files Browse the repository at this point in the history
…for class based click listeners (#157)
  • Loading branch information
tschob authored and hebertialmeida committed Sep 23, 2016
1 parent 1c0d677 commit ebe309e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Resources/Bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ function addClassBasedOnClickListenerToElement(element, schemeName, attributeNam
}

var onClassBasedListenerClick = function(schemeName, attributeContent) {
// Prevent the browser from performing the default on click behavior
event.preventDefault();
// Don't pass the click event to other elemtents
event.stopPropagation();
// Create parameters containing the click position inside the web view.
var positionParameterString = "/clientX=" + event.clientX + "&clientY=" + event.clientY;
// Set the custom link URL to the event
Expand Down

0 comments on commit ebe309e

Please sign in to comment.