mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 21:30:58 +00:00 
			
		
		
		
	LibWeb: Allow keyboard input to alter email inputs
Previously, the`HTMLInputElement.selectinStart` and `HTMLInputElement.selectionEnd` IDL setters, and the `setRangeText()` IDL method were used when updating an input's value on keyboard input. These methods can't be used for this purpose, since selection doesn't apply to email type inputs. Therefore, this change introduces internal-use only methods that don't check whether selection applies to the given input.
This commit is contained in:
		
							parent
							
								
									79da6d48c1
								
							
						
					
					
						commit
						db24440403
					
				
				
				Notes:
				
					github-actions[bot]
				
				2024-12-30 10:05:12 +00:00 
				
			
			Author: https://github.com/tcl3
Commit: db24440403
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3065
Reviewed-by: https://github.com/Gingeh ✅
			
					 8 changed files with 83 additions and 40 deletions
				
			
		|  | @ -328,22 +328,22 @@ WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_rows(WebIDL::UnsignedLong row | |||
| 
 | ||||
| WebIDL::UnsignedLong HTMLTextAreaElement::selection_start_binding() const | ||||
| { | ||||
|     return selection_start().value(); | ||||
|     return FormAssociatedTextControlElement::selection_start_binding().value(); | ||||
| } | ||||
| 
 | ||||
| WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_selection_start_binding(WebIDL::UnsignedLong const& value) | ||||
| { | ||||
|     return set_selection_start(value); | ||||
|     return FormAssociatedTextControlElement::set_selection_start_binding(value); | ||||
| } | ||||
| 
 | ||||
| WebIDL::UnsignedLong HTMLTextAreaElement::selection_end_binding() const | ||||
| { | ||||
|     return selection_end().value(); | ||||
|     return FormAssociatedTextControlElement::selection_end_binding().value(); | ||||
| } | ||||
| 
 | ||||
| WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_selection_end_binding(WebIDL::UnsignedLong const& value) | ||||
| { | ||||
|     return set_selection_end(value); | ||||
|     return FormAssociatedTextControlElement::set_selection_end_binding(value); | ||||
| } | ||||
| 
 | ||||
| String HTMLTextAreaElement::selection_direction_binding() const | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter