Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

while layer.onclick set to null in the handler, but the handler still execute. #544

Open
borenXue opened this issue Jan 6, 2018 · 0 comments

Comments

@borenXue
Copy link

borenXue commented Jan 6, 2018

while my code is below, the handler will execute multiple times.
But In fact, I only need to execute it once

document.addEventListener('DOMContentLoaded', function() {

	document.body.onclick = function () {
		// do something
		document.body.onclick = null
	}

	FastClick.attach(document.body);

}, false);
@borenXue borenXue changed the title layer.onclick re-assignment but internal variable: oldOnClick not update while layer.onclick set to null int the handler, but the handler still execute. Jan 6, 2018
@borenXue borenXue changed the title while layer.onclick set to null int the handler, but the handler still execute. while layer.onclick set to null in the handler, but the handler still execute. Jan 6, 2018
borenXue pushed a commit to borenXue/fastclick that referenced this issue Jan 6, 2018
octobeard added a commit to octobeard/fastclick that referenced this issue Apr 18, 2018
octobeard added a commit to Keenwawa/fastclick that referenced this issue Apr 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant