mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
fix(toolbar): Don't close the floating toolbar when clicking in the link input
This is a bit of a quick and dirty fix, but fixes T3511
This commit is contained in:
parent
2709f2867e
commit
d6f65d626d
1 changed files with 5 additions and 1 deletions
|
@ -87,11 +87,12 @@ class FloatingToolbar extends React.Component
|
|||
<div className="toolbar-new-link"
|
||||
onMouseEnter={@_onMouseEnter}
|
||||
onMouseLeave={@_onMouseLeave}>
|
||||
<i className="fa fa-link preview-btn-icon"></i>
|
||||
<i className="fa fa-link preview-btn-icon" onClick={@_onPreventToolbarClose}></i>
|
||||
<input type="text"
|
||||
ref="urlInput"
|
||||
value={@state.urlInputValue}
|
||||
onBlur={@_saveUrl}
|
||||
onClick={@_onPreventToolbarClose}
|
||||
onKeyPress={@_saveUrlOnEnter}
|
||||
onChange={@_onInputChange}
|
||||
className="floating-toolbar-input #{withRemove}"
|
||||
|
@ -102,6 +103,9 @@ class FloatingToolbar extends React.Component
|
|||
{removeBtn}
|
||||
</div>
|
||||
|
||||
_onPreventToolbarClose: (event) =>
|
||||
event.stopPropagation()
|
||||
|
||||
_onMouseEnter: =>
|
||||
@isHovering = true
|
||||
@props.onMouseEnter?()
|
||||
|
|
Loading…
Reference in a new issue