这是indexloc提供的服务,不要输入任何密码
Skip to content

🐛 amp-inputmask: query is too zealous #29624

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

Merged
merged 3 commits into from
Aug 4, 2020

Conversation

samouri
Copy link
Member

@samouri samouri commented Jul 31, 2020

Fixes #29100, #28062. The issue is due to trying to mask elements that may have the mask attribute but aren't <input>s.

From checking example documents with this error, it often occurs in SVGs

for the reviewer: are there any situation in which the input mask can be called on a non <input> element? If so then we'll need a different fix.

@google-cla google-cla bot added the cla: yes label Jul 31, 2020
@amp-owners-bot amp-owners-bot bot requested a review from alanorozco July 31, 2020 22:15
@samouri samouri self-assigned this Jul 31, 2020
@samouri samouri force-pushed the fix-inputmaksreplace branch from 2a5cf45 to 0f53cb1 Compare August 3, 2020 20:47
@samouri samouri changed the title amp-inputmask: Handle onBeforeMask undefined value 🐛 amp-inputmask: query is too zealous Aug 3, 2020
@samouri samouri requested review from caroqliu and removed request for alanorozco August 3, 2020 21:01
@caroqliu
Copy link
Contributor

caroqliu commented Aug 4, 2020

are there any situation in which the input mask can be called on a non element? If so then we'll need a different fix.

Input mask should only be on <input>: see validator rules.

@samouri samouri merged commit 9aa707d into ampproject:master Aug 4, 2020
@samouri samouri deleted the fix-inputmaksreplace branch August 4, 2020 15:11
ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
* amp-inputmask: Handle onBeforeMask undefined value

* better fix

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚨 Error: undefined is not an object (evaluating 'a.replace')
3 participants