mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:02:46 +00:00 
			
		
		
		
	LibWeb: Update the stored textarea value upon change
And fire the "input" event upon change. This is needed to submit a comment on GitHub; otherwise, GitHub thinks the textarea value is empty.
This commit is contained in:
		
							parent
							
								
									50d3f85f75
								
							
						
					
					
						commit
						ed13793110
					
				
					 4 changed files with 39 additions and 0 deletions
				
			
		|  | @ -12,6 +12,7 @@ | |||
| #include <LibWeb/DOM/Text.h> | ||||
| #include <LibWeb/HTML/FormAssociatedElement.h> | ||||
| #include <LibWeb/HTML/HTMLElement.h> | ||||
| #include <LibWeb/Platform/Timer.h> | ||||
| #include <LibWeb/WebIDL/Types.h> | ||||
| 
 | ||||
| namespace Web::HTML { | ||||
|  | @ -109,6 +110,8 @@ private: | |||
|     void handle_readonly_attribute(Optional<String> const& value); | ||||
|     void handle_maxlength_attribute(); | ||||
| 
 | ||||
|     void queue_firing_input_event(); | ||||
| 
 | ||||
|     void update_placeholder_visibility(); | ||||
|     JS::GCPtr<DOM::Element> m_placeholder_element; | ||||
|     JS::GCPtr<DOM::Text> m_placeholder_text_node; | ||||
|  | @ -116,6 +119,8 @@ private: | |||
|     JS::GCPtr<DOM::Element> m_inner_text_element; | ||||
|     JS::GCPtr<DOM::Text> m_text_node; | ||||
| 
 | ||||
|     RefPtr<Web::Platform::Timer> m_input_event_timer; | ||||
| 
 | ||||
|     // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-dirty
 | ||||
|     bool m_dirty_value { false }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn