File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1566,8 +1566,8 @@ This is a fully client-side application. Your content never leaves your browser
15661566 if ( mode === 'split' ) {
15671567 // Restore preserved pane widths when entering split mode
15681568 applyPaneWidths ( ) ;
1569- } else if ( previousMode === 'split' ) {
1570- // Reset pane widths when leaving split mode
1569+ } else {
1570+ // Reset inline pane widths when not in split mode
15711571 resetPaneWidths ( ) ;
15721572 }
15731573
@@ -2841,7 +2841,8 @@ This is a fully client-side application. Your content never leaves your browser
28412841 const activeEl = document . activeElement ;
28422842 const isTextControl = activeEl && ( activeEl . tagName === "TEXTAREA" || activeEl . tagName === "INPUT" ) ;
28432843 const hasSelection = window . getSelection && window . getSelection ( ) . toString ( ) . trim ( ) . length > 0 ;
2844- if ( ! isTextControl && ! hasSelection ) {
2844+ const editorHasSelection = markdownEditor . selectionStart !== markdownEditor . selectionEnd ;
2845+ if ( ! isTextControl && ! hasSelection && ! editorHasSelection ) {
28452846 e . preventDefault ( ) ;
28462847 copyMarkdownButton . click ( ) ;
28472848 }
Original file line number Diff line number Diff line change @@ -2841,7 +2841,8 @@ This is a fully client-side application. Your content never leaves your browser
28412841 const activeEl = document . activeElement ;
28422842 const isTextControl = activeEl && ( activeEl . tagName === "TEXTAREA" || activeEl . tagName === "INPUT" ) ;
28432843 const hasSelection = window . getSelection && window . getSelection ( ) . toString ( ) . trim ( ) . length > 0 ;
2844- if ( ! isTextControl && ! hasSelection ) {
2844+ const editorHasSelection = markdownEditor . selectionStart !== markdownEditor . selectionEnd ;
2845+ if ( ! isTextControl && ! hasSelection && ! editorHasSelection ) {
28452846 e . preventDefault ( ) ;
28462847 copyMarkdownButton . click ( ) ;
28472848 }
You can’t perform that action at this time.
0 commit comments