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() {
126
126
127
127
deleteToolbar ( )
128
128
setTimeout ( ( ) => {
129
- const selection = window . getSelection ( ) ?. toString ( )
129
+ const selection = window . getSelection ( ) ?. toString ( ) . trim ( )
130
130
if ( selection ) {
131
131
const inputElement = selectionElement . querySelector ( 'input, textarea' )
132
132
let position
@@ -165,7 +165,7 @@ async function prepareForSelectionTools() {
165
165
( e . target . nodeName === 'INPUT' || e . target . nodeName === 'TEXTAREA' )
166
166
) {
167
167
setTimeout ( ( ) => {
168
- if ( ! window . getSelection ( ) ?. toString ( ) ) deleteToolbar ( )
168
+ if ( ! window . getSelection ( ) ?. toString ( ) . trim ( ) ) deleteToolbar ( )
169
169
} )
170
170
}
171
171
} )
@@ -183,7 +183,7 @@ async function prepareForSelectionToolsTouch() {
183
183
184
184
deleteToolbar ( )
185
185
setTimeout ( ( ) => {
186
- const selection = window . getSelection ( ) ?. toString ( )
186
+ const selection = window . getSelection ( ) ?. toString ( ) . trim ( )
187
187
if ( selection ) {
188
188
toolbarContainer = createElementAtPosition (
189
189
e . changedTouches [ 0 ] . pageX + 20 ,
You can’t perform that action at this time.
0 commit comments