Material: autocomplete: SyntaxError: Invalid regular expression when typing (

Created on 13 May 2020  路  2Comments  路  Source: angular/material

Bug, enhancement request, or proposal

Bug

Demo and steps to reproduce the issue

Demo URL (required)*:
https://material.angularjs.org/latest/demo/autocomplete

Detailed Reproduction Steps

  1. input into Autocomplete the char (
  2. check browser console

Explain the expected behavior

No errors is Browser Console.

Explain the current behavior

Error in Browser Console:

SyntaxError: Invalid regular expression: /^test (/: Unterminated group
    at new RegExp (<anonymous>)
    at ee.createRegex (angular-material.min.js:7)
    at ee.onRender (angular-material.min.js:7)
    at m.$digest (angular.js:19143)
    at b.$apply (angular.js:19503)
    at Object.$$debounceViewValueCommit (angular.js:30903)
    at Object.$setViewValue (angular.js:30877)
    at HTMLInputElement.l (angular.js:26518)
    at sg (angular.js:3826)
    at HTMLInputElement.d (angular.js:3814)

List the affected versions of AngularJS, Material, OS, and browsers

  • AngularJS: 1.7.9
  • AngularJS Material: 1.1.22 (1.1.21 - no bug)
  • OS: Windows 10
  • Browsers: Chrome

Add anything else we should know

This bug appeared after upgrade from v1.1.21 to v1.1.22

Screenshots

image

urgent Pull Request fixed regression bug

Most helpful comment

Thank you for this report! I can reproduce this on the docs and locally. The regression was caused by PR https://github.com/angular/material/pull/11855. @psamim you may be interested in this. Hopefully I can fix it quickly and easily.

Investigating...

All 2 comments

Thank you for this report! I can reproduce this on the docs and locally. The regression was caused by PR https://github.com/angular/material/pull/11855. @psamim you may be interested in this. Hopefully I can fix it quickly and easily.

Investigating...

Was this page helpful?
0 / 5 - 0 ratings