[Webkit-unassigned] [Bug 182725] New: Paste text into input or textarea gives it length (maxlength+2)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 13 00:03:23 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=182725
Bug ID: 182725
Summary: Paste text into input or textarea gives it length
(maxlength+2)
Product: WebKit
Version: Safari 11
Hardware: Macintosh
OS: macOS 10.13
Status: NEW
Severity: Normal
Priority: P2
Component: Forms
Assignee: webkit-unassigned at lists.webkit.org
Reporter: hjvanranden at gmail.com
CC: cdumez at apple.com, wenson_hsieh at apple.com
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.
--
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/20180213/85db5fde/attachment-0001.html>
More information about the webkit-unassigned
mailing list