Comments (23)
@msimpson I had a similar issue, with a different potential solution (#30) however the issue seemed to have been resolved in version 1.4.2. What version are you working on?
from ui-mask.
@msimpson it also may have something to do with this
d120b8c
from ui-mask.
Closing since @marbletravis gave solutions
from ui-mask.
I'm on version 1.4.5, have been from the start, and neither comments are solutions. I don't have the time to make a demo of this issue. But if someone does, try it out--it's there.
from ui-mask.
@msimpson I wonder, is the element gaining focus? One solution I have had to use, not sure if its something that needs to change, is to limit the events to handle to ['input', 'keyup'].
The other day I was wondering (have not had time to look into it) if we can make the mask process (handle events) from focus and click without dirtying the model. For us only handling input and keyup is sufficient.
To override the config you just need to re-declare the config, we do it in our app.js
angular.module('...', []).value('uiMaskConfig', {
maskDefinitions: {
'9': /\d/,
'A': /[a-zA-Z]/,
'*': /[a-zA-Z0-9]/
},
clearOnBlur: false,
eventsToHandle: ['input', 'keyup']
})
from ui-mask.
@marbletravis
Dropping focus does work around the issue, yes. But, again, this needs to be fixed at its core.
from ui-mask.
@msimpson Sorry, my bad for not re-reading the whole op.
I am not sure what purpose focus/click serve, for us we didn't see a change in any behavior when switching to just input/keyup. I may have some spare cycles friday to look at the core issue, but wondering if you or @PowerKiKi can offer any context as to why we handle those events anyway.
from ui-mask.
@marbletravis
I'm not sure why those events are watched, either. Perhaps just paranoia over the slew of events signaling modification. Also, I found that while removing click and focus does resolve the pristine/untouched issue for mouse interaction it fails when tabbing through the fields as keyup is caught instead. Therefore, I still have no solid workaround.
from ui-mask.
@marbletravis sorry, I don't have any explanation either. Your best bet is to dig through git blame
.
from ui-mask.
suffering with this ui-mask issue dirtying an otherwise prisitine page when nothing happens but a collapse / expand for e.g.
still very much open issue (in Object {full: "1.4.5", major: 1, minor: 4, dot: 5, codeName: "permanent-internship"} at least.
what's the fix / work-around / hack / ???
from ui-mask.
@petejordan @msimpson I haven't had much time to devote to this. But I did implement some changes on my fork, which if it works I will create a pull request into the main repo. I can test this tomorrow afternoon, (I don't have a good test setup at home) but in the meantime if either of you want to test it out you can pull from here.
https://github.com/marbletravis/ui-mask
If you are using bower, see this SO https://stackoverflow.com/questions/19348076/installing-a-dependency-with-bower-from-url-and-specify-version
If you have time to verify please let me know the outcome.
from ui-mask.
No go, it still has some $pristine issues. I will keep looking at it. Please be patient, I can't work on this at work much (not part of my main tasks right now) and have a family that occupies the rest of my time. I think I can look at this some more Friday.
from ui-mask.
@PowerKiKi should we reopen this?
from ui-mask.
Yes! Yes! Please re-open.
The mask dirty seems OK but form still dirty.
Thx much,
petejordan
On Oct 7, 2015 3:54 PM, "marbletravis" [email protected] wrote:
No go, it still has some $pristine issues. I will keep looking at it.
Please be patient, I can't work on this at work much (not part of my main
tasks right now) and have a family that occupies the rest of my time. I
think I can look at this some more Friday.—
Reply to this email directly or view it on GitHub
#41 (comment).
from ui-mask.
I reopen as requested by @marbletravis, but I won't be working on it.
Thanks @marbletravis for your past and future work on this issue.
from ui-mask.
I am also having this issue, but it is localized to IE only. Is this the case with everyone else's issues?
from ui-mask.
Chrome also has problem of false dirty.
On Oct 13, 2015 12:32 PM, "Brad Richardson" [email protected]
wrote:
I am also having this issue, but it is localized to IE only. Is this the
case with everyone else's issues?—
Reply to this email directly or view it on GitHub
#41 (comment).
from ui-mask.
@bradrich I recall having some issues with IE, and I recall seeing a pull request to fix them. But can't find it anymore. Are you using latest?
from ui-mask.
1.4.7, yes, it is the latest version. I am not seeing the error in Chrome at this current moment, only IE.
from ui-mask.
Is anyone close to fixing this issue? All of the states are messed up. It should set them just like any other input would that is not using ui-mask on it. Right when I click or tab to the field I get my required error message even though it should only display the message when the field is dirty or has an error but since ui-mask is changing dirty right when the field is focused on it makes this impossible.
from ui-mask.
@blake-nouribekian There is a pull request in with a fix. Just waiting for approval. You can switch to my fork temporarily if you need it faster.
from ui-mask.
Great... Thanks so much! I'm launching a business/website very soon so the less issues the better
from ui-mask.
I've got another pull request in for this issue, #57
from ui-mask.
Related Issues (20)
- Glitch if mask contains prefix and prefix has space character
- Allow modelViewValue to be set via config rather than element attribute
- config provider name is incorrect HOT 3
- Mask not being properly formatted HOT 1
- Caret skips to second digit on focus when phone number already present
- Cursor position in ui-number-mask is incorrect
- Mask value being setted as 0 if null
- Paste not working
- package v1.8.7 on npm is not up to date with the code in the repo
- allowInvalidTrue causes backspace deletes all HOT 1
- Add option to reverse fill
- can work with other "directive" together?
- Cursor position is wrong when Voice over is on
- Deleting using backspace properly not working while it's a masked field like phone number in angular formly
- Cursor moves to the one before last position after mouse select all and enter new character
- Cursor moves to the one before last position if select mask character and enter new values
- Archive this project HOT 2
- ui-mask="1.1.9.999" error
- Is it possible to have 2 mask
- Demo page inoperable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui-mask.