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

fix(utils): add the ability to prevent the default action of onEvents #236

Closed
wants to merge 1 commit into from

Conversation

poxrud
Copy link
Contributor

@poxrud poxrud commented Jan 26, 2016

Add the ability to prevent the default action of onEvent (onclick, onpaste, etc..) from occurring
by returning false.

For example, you should be able to stop text from being pasted into a textbox with:

textarea.onpaste = function() { 
  return false;
}

I discovered this during my investigation of issue #232, which this PR fixes.
I suspect it will also fix issue meteorhacks/zones#80

…(onclick, onpaste,etc..) by returning false.
@poxrud
Copy link
Contributor Author

poxrud commented Mar 18, 2016

@mhevery
This PR is now incompatible with POST-v0.6.0., however I've verified that this issue still exists.
Should I submit a new PR for this?

@mhevery
Copy link
Contributor

mhevery commented Mar 18, 2016

Yes please!

@mhevery
Copy link
Contributor

mhevery commented Mar 21, 2016

Any update on a rebase?

@mhevery
Copy link
Contributor

mhevery commented Mar 21, 2016

Actually, it applies cleanly, and tests, pass so I am merging it in.

@mhevery mhevery closed this in 3361603 Mar 21, 2016
mhevery pushed a commit that referenced this pull request Mar 21, 2016
…(onclick, onpaste,etc..) by returning false.

Closes #236
mhevery pushed a commit that referenced this pull request Mar 21, 2016
…(onclick, onpaste,etc..) by returning false.

Closes #236
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants