WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
182725
Smart paste can result in exceeding maxlength
https://bugs.webkit.org/show_bug.cgi?id=182725
Summary
Smart paste can result in exceeding maxlength
Hendrik Jan van Randen
Reported
2018-02-13 00:03:23 PST
When you paste 3 characters into an input or textarea in which the text has length (maxlength - 1), it gets a length of (maxlength + 2), due to two spaces pasted before and after the pasted 1st character of the text. This can be reproduced in
https://embed.plnkr.co/wHAtfCWA1IUi6oKlqc9Y/
or in this source code: <html><head></head> <body> qwe <input maxlength="3"/> </body> </html> Reproduction scenario: 1. Run the above code 2. Double click qwe to select it 3. Copy 4. Click in the textbox 5. Type aa 6. Press arrow left to position the caret between the a's 7. Paste Now the textbox contains: a q a This has length 5, while its maxlength is 3.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug