[Webkit-unassigned] [Bug 277651] New: Input minLength validity not working after type changed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 5 15:39:16 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=277651

            Bug ID: 277651
           Summary: Input minLength validity not working after type
                    changed
           Product: WebKit
           Version: Safari 17
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: piotr.kniaz at icloud.com
                CC: cdumez at apple.com, wenson_hsieh at apple.com

Created attachment 472066

  --> https://bugs.webkit.org/attachment.cgi?id=472066&action=review

HTML example to reproduce the bug

When changing the input field type (from "text" to "password" or vice versa), the browser incorrectly validate the input minlength. Reproducible if you change the input type via JavaScript or manually via Safari Developer Tools.

Steps to Reproduce:
1. Open my example (bug.html) in Safari
2. Open browser console to control the result
3. Enter LESS than 8 characters in the password input field (minlength set to 8)
4. Click on the checkbox "Show password" or change input type to "text" manually in page "Elements"
5. Press on "Continue" button

Actual Results:
The result of form validation (input.checkValidity) is displayed in the browser console ("Input is valid"). The browser considered the form valid.


Expected Results:
The browser should consider input less than 8 characters (in this example) as invalid. input.checkValidity should return "false", and the console should display "Input is invalid".

Platforms:
Safari 17.6 (19618.3.11.11.5), MacOS 14.6, MacBook Air M1
iOS 17.6, iPhone 13
iOS 15.8.3, iPhone SE 1st Gen

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240805/f9c4b0aa/attachment.htm>


More information about the webkit-unassigned mailing list