New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with jquery validate #3019
Comments
Thanks for reporting this. It is best to check with the guys from jQuery validate as it looks like they have some code in there which is being applied to all the elements on the page. |
it's not jquery validate error... |
jquery.validate.js:1032 Uncaught TypeError: Cannot read property 'replace' of undefined |
Same here |
@hoquochai Do you think it would be possible to make a jsFiddle to highlight the problem? That would speed-up things a lot. Here is a basic jsFiddle you could use as a starting point: https://jsfiddle.net/froala/wc5c3jhk/. so I can reopen the issue? |
Not sure if it is the best selector to use but seems to stop the error from happening: |
I'm having this problem as well and none of the above selectors work for ignoring the error. One thing that might at least help is to correct the actual error
which is caused by calling replace() on an empty css string. This interrupts the remaining validation due to the throw and prevents the new value from being copied into the underlying textarea element. If we could get that error fixed (simply guarantee that "a" is valid or at least check it in escapeCSSMeta before calling replace() on it) then some of the side effects of the bug would be alleviated. I am aware that this issue in jquery validation. I am simply hoping that someone can fix the bug causing the "a" value being passed into escapeCssMeta from being undefined. Either way, can we get a final ruling on whether this is going to get fixed? In the meantime I'm going to hack my local copy until someone can fix this once and for all. Thanks |
Please change
to
Thanks. |
This is now merged on jQuery Validate: |
Actual behavior.
When using jquery.validate (https://github.com/jquery-validation/jquery-validation) on the same form where a Froala WYSIWYG editor is embedded, we see the following error:
Cannot read property 'replace' of undefined at a.validator.escapeCssMeta
Steps to reproduce the problem.
On the form where you use the editor
$('form').validate();
Then load the editor inside the form:
$('div#froala-editor').froalaEditor({ toolbarButtons: ['html'] })
In particular, I am using the html toolbar-object to switch between wysiwyg and code view. Then the error pops up.
OS.
Mac OS 10.13.6
Browser.
Chrome 68.0.3440.106
The text was updated successfully, but these errors were encountered: