Undo not working on textarea with listener
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
People
(Reporter: msaglietto, Unassigned)
Details
(Keywords: parity-chrome)
Attachments
(1 file)
1.96 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
We did an autoresize textarea element using a listener on the input event
Reproduce steps on the html attached:
1 . Add event listener on input
2 . Try to modify the element.style.overflowY twice during the input event
Actual results:
The undo stop working on the textarea
If you comment the line :
element.style.overflowY = 'auto';
Or
element.style.overflowY = maxHeight && height > maxHeight ? 'auto' : 'hidden';
The undo works fine
Expected results:
Undo should not be affected for what code is inside the listener if the event is not prevented
Comment 1•6 years ago
|
||
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Hi,
I have managed to reproduce this issue on latest FF release 70.0.1, Beta 71.0b8 and latest Nightly build 72.0a1 (2019-11-10) using Ubuntu 18.04 and Windows 10.
Further, I will move this over to a component so developers can take a look over it. If this is not the correct component please feel free to change it to an appropriate one.
The issue is not reproducible on Chrome.
Thanks for the report.
Comment 2•6 years ago
|
||
Element_Binding::get_scrollHeight
destroys text control frame, then when recreate frame, we will destroy history by the following.
Child-SP RetAddr Call Site
00000022`ee9fa198 00007ffd`0cfa470e xul!mozilla::TextEditor::SetTextAsAction
00000022`ee9fa1a0 00007ffd`0cfa3f09 xul!mozilla::TextControlState::SetValueWithTextEditor+0x3ee
00000022`ee9fa300 00007ffd`0cf93f45 xul!mozilla::TextControlState::SetValue+0x2c9
(Inline Function) --------`-------- xul!mozilla::TextControlState::SetValue+0x1c
00000022`ee9fa470 00007ffd`0cfaa53d xul!mozilla::TextControlState::PrepareEditor+0xa25
00000022`ee9fa660 00007ffd`0af6a976 xul!mozilla::PrepareEditorEvent::Run+0x3d
00000022`ee9fa6a0 00007ffd`0d7c5d97 xul!nsContentUtils::RemoveScriptBlocker+0x136
(Inline Function) --------`-------- xul!nsAutoScriptBlocker::~nsAutoScriptBlocker+0x5
00000022`ee9fa710 00007ffd`0afcf040 xul!mozilla::PresShell::DoFlushPendingNotifications+0x4b7
(Inline Function) --------`-------- xul!mozilla::PresShell::FlushPendingNotifications+0x1d2
00000022`ee9fa830 00007ffd`0b4d8255 xul!mozilla::dom::Document::FlushPendingNotifications+0x2d0
(Inline Function) --------`-------- xul!mozilla::dom::Document::FlushPendingNotifications+0x15
00000022`ee9fa8a0 00007ffd`0b4d8165 xul!nsIContent::GetPrimaryFrame+0x35
00000022`ee9fa8d0 00007ffd`0c35c1be xul!mozilla::dom::Element::GetScrollFrame+0x15
00000022`ee9fa910 00007ffd`0cb29e57 xul!mozilla::dom::Element::SetScrollTop+0x2e
00000022`ee9fa970 00007ffd`0cce295b xul!mozilla::dom::Element_Binding::set_scrollTop+0x97
...
00000022`ee9fc240 00007ffd`0d6cba29 xul!nsContentUtils::DispatchInputEvent+0x4e2
00000022`ee9fc380 00007ffd`0b3f210f xul!mozilla::EditorBase::FireInputEvent+0xc9
Updated•5 years ago
|
Comment 3•5 years ago
|
||
S1 or S2 bugs needs an assignee - could you find someone for this bug?
Updated•5 years ago
|
Description
•