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

attempts to fix an issue with modelViewValue, addresses an issue with… #57

Closed
wants to merge 0 commits into from

Conversation

Tim91084
Copy link
Contributor

… extra character input, addresses an issue with passing eventsToHandle in ui-options, fixes test and demo for changes

Model View Value

I propose a slight change for the model-view-value implementation. It shouldn't update the model with a trailing mask. For example:

for view value (999) 123-123_ X____
model value should be: (999) 123-123

Fix ui-options for eventsToHandle

This wasn't working, I think, because of a bug in the code. I made an attempt to fix it. To summarize the fix, ui-mask was extending the passed in options with the base and eventsToHandle was being overwritten.

Prevent model update on focus when there are no changes being made

The event handler was updating the model on focus (by calling setViewValue) even if there was no user input.

Updated demo page and fixed a test

I updated the demo page so that you can test model view value and eventsToHandle.

@marbletravis
Copy link
Contributor

@PowerKiKi I think this might be the better approach (at least seems more likely to cover other cases). However I am also not opposed to keeping #51 as well as it will give people the ability to control dirty changes if the value does change (possibly programatically?), not sure.

@PowerKiKi
Copy link
Contributor

Trusting @marbletravis opinion on this. @Tim91084 could you rebase the PR please ? then i'll merge

@Tim91084 Tim91084 closed this Nov 10, 2015
@Tim91084
Copy link
Contributor Author

rebased and moved to #69

@jeffsheets
Copy link

Wow, good timing, thank you. This commit fixes a bug that I was just about to open that was happening on IE11 when a select box is on the same form.
http://plnkr.co/edit/PPDIiYrcIFY59o5zql9N?p=preview

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.

4 participants