FIX: properly check key values for shortcuts (#463)
- Update angle bracket components to use vanilla attributes where possible - Update how we check for key value after changing to `on "change"` from `onChange`
This commit is contained in:
		
							parent
							
								
									11988a9e68
								
							
						
					
					
						commit
						ba47a238ac
					
				| 
						 | 
				
			
			@ -72,7 +72,7 @@ export default Controller.extend(ModalFunctionality, {
 | 
			
		|||
  },
 | 
			
		||||
 | 
			
		||||
  @action
 | 
			
		||||
  handleTextAreaKeydown(value, event) {
 | 
			
		||||
  handleTextAreaKeydown(event) {
 | 
			
		||||
    if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
 | 
			
		||||
      this.assign();
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
<DModalBody @class="assign">
 | 
			
		||||
<DModalBody class="assign">
 | 
			
		||||
  <div>
 | 
			
		||||
    <div class="control-group {{if this.assigneeError 'assignee-error'}}">
 | 
			
		||||
      <label>{{i18n "discourse_assign.assign_modal.assignee_label"}}</label>
 | 
			
		||||
| 
						 | 
				
			
			@ -61,16 +61,16 @@
 | 
			
		|||
</DModalBody>
 | 
			
		||||
 | 
			
		||||
<div class="modal-footer">
 | 
			
		||||
  {{d-button
 | 
			
		||||
    label=(if
 | 
			
		||||
  <DButton
 | 
			
		||||
    @label={{if
 | 
			
		||||
      model.reassign
 | 
			
		||||
      "discourse_assign.reassign.title"
 | 
			
		||||
      "discourse_assign.assign_modal.assign"
 | 
			
		||||
    )
 | 
			
		||||
    icon=inviteIcon
 | 
			
		||||
    action=(action "assign")
 | 
			
		||||
    class="btn-primary"
 | 
			
		||||
    disabled=disabled
 | 
			
		||||
    }}
 | 
			
		||||
    @icon={{inviteIcon}}
 | 
			
		||||
    @action={{this.assign}}
 | 
			
		||||
    class="btn-primary"
 | 
			
		||||
    @disabled={{disabled}}
 | 
			
		||||
  />
 | 
			
		||||
  <DModalCancel @close={{route-action "closeModal"}} />
 | 
			
		||||
</div>
 | 
			
		||||
		Loading…
	
		Reference in New Issue