```js textarea = document.createElement("textarea"); textarea.onselect = console.log; textarea.value = "Foo"; textarea.select(); clone = textarea.cloneNode(true); clone.onselect = console.log; textarea.select(); ``` Expected: Both should fire a select event Actual: Only the first one should fire one Cloning the element does not properly set the maxLength in SelectionProperties.
Bug 1682313 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
```js textarea = document.createElement("textarea"); textarea.onselect = console.log; textarea.value = "Foo"; textarea.select(); clone = textarea.cloneNode(true); clone.onselect = console.log; clone.select(); ``` Expected: Both should fire a select event Actual: Only the first one should fire one Cloning the element does not properly set the maxLength in SelectionProperties.
```js // <textarea id="textarea">Foo</textarea> clone = document.all.textarea.cloneNode(true); clone.onselect = console.log; clone.select(); ``` Expected: Both should fire a select event Actual: Only the first one should fire one Cloning the element does not properly set the maxLength in SelectionProperties.
```js textarea = document.createElement("textarea"); textarea.textContent = "Foo"; clone = textarea.cloneNode(true); clone.onselect = console.log; clone.select(); ``` Expected: Both should fire a select event Actual: Only the first one should fire one Cloning the element does not properly set the maxLength in SelectionProperties.