File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ async function prepareForSelectionTools() {
126126
127127 deleteToolbar ( )
128128 setTimeout ( ( ) => {
129- const selection = window . getSelection ( ) ?. toString ( )
129+ const selection = window . getSelection ( ) ?. toString ( ) . trim ( )
130130 if ( selection ) {
131131 const inputElement = selectionElement . querySelector ( 'input, textarea' )
132132 let position
@@ -165,7 +165,7 @@ async function prepareForSelectionTools() {
165165 ( e . target . nodeName === 'INPUT' || e . target . nodeName === 'TEXTAREA' )
166166 ) {
167167 setTimeout ( ( ) => {
168- if ( ! window . getSelection ( ) ?. toString ( ) ) deleteToolbar ( )
168+ if ( ! window . getSelection ( ) ?. toString ( ) . trim ( ) ) deleteToolbar ( )
169169 } )
170170 }
171171 } )
@@ -183,7 +183,7 @@ async function prepareForSelectionToolsTouch() {
183183
184184 deleteToolbar ( )
185185 setTimeout ( ( ) => {
186- const selection = window . getSelection ( ) ?. toString ( )
186+ const selection = window . getSelection ( ) ?. toString ( ) . trim ( )
187187 if ( selection ) {
188188 toolbarContainer = createElementAtPosition (
189189 e . changedTouches [ 0 ] . pageX + 20 ,
You can’t perform that action at this time.
0 commit comments