File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -245,9 +245,14 @@ export class LineCursor extends Marker {
245245 return true ;
246246 case ASTNode . types . INPUT :
247247 return ! ( location as Blockly . Connection ) . isConnected ( ) ;
248- case ASTNode . types . FIELD :
249- // @ts -expect-error isFullBlockField is a protected method.
250- return ! ( location as Blockly . Field ) . isFullBlockField ( ) ;
248+ case ASTNode . types . FIELD : {
249+ const field = node . getLocation ( ) as Blockly . Field ;
250+ return ! (
251+ field . getSourceBlock ( ) ?. isSimpleReporter ( ) &&
252+ // @ts -expect-error isFullBlockField is a protected method.
253+ field . isFullBlockField ( )
254+ ) ;
255+ }
251256 default :
252257 return false ;
253258 }
Original file line number Diff line number Diff line change @@ -1456,12 +1456,14 @@ function fakeEventForNode(node: Blockly.ASTNode): PointerEvent {
14561456 * @returns True if we showed the editor, false otherwise.
14571457 */
14581458function tryShowFullBlockFieldEditor ( block : Blockly . Block ) : boolean {
1459- for ( const input of block . inputList ) {
1460- for ( const field of input . fieldRow ) {
1461- // @ts -expect-error isFullBlockField is a protected method.
1462- if ( field . isClickable ( ) && field . isFullBlockField ( ) ) {
1463- field . showEditor ( ) ;
1464- return true ;
1459+ if ( block . isSimpleReporter ( ) ) {
1460+ for ( const input of block . inputList ) {
1461+ for ( const field of input . fieldRow ) {
1462+ // @ts -expect-error isFullBlockField is a protected method.
1463+ if ( field . isClickable ( ) && field . isFullBlockField ( ) ) {
1464+ field . showEditor ( ) ;
1465+ return true ;
1466+ }
14651467 }
14661468 }
14671469 }
You can’t perform that action at this time.
0 commit comments