File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -872,6 +872,7 @@ class PainterroProc {
872872 let handled = false ;
873873 const clipFormat = 'image/png' ;
874874 if ( evt . keyCode === KEYS . c && ( evt . ctrlKey || evt . metaKey ) ) {
875+ console . log ( 'handing copy' )
875876 if ( ! this . inserter . waitChoice && ! this . select . imagePlaced && this . select . shown ) {
876877 const a = this . select . area ;
877878 const w = a . bottoml [ 0 ] - a . topl [ 0 ] ;
@@ -1019,8 +1020,12 @@ class PainterroProc {
10191020 }
10201021 } ,
10211022 keydown : ( e ) => {
1022- if ( event . target !== document . body ) {
1023- return ; // ignore all focused inputs on page
1023+ console . log ( 'event.target !== document.body' , event . target , document . body ) ;
1024+ const argetEl = event . target ;
1025+ const ignoreForSelectors = [ 'input' , 'textarea' , 'div[contenteditable]' ] ;
1026+
1027+ if ( ignoreForSelectors . some ( selector => argetEl . matches ( selector ) ) ) {
1028+ return ; // ignore all elemetents which could be focused
10241029 }
10251030 if ( this . shown ) {
10261031 if ( this . colorPicker . handleKeyDown ( e ) ) {
You can’t perform that action at this time.
0 commit comments