Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Suggestions popup is not closed after view change #241

Closed
nausharipov opened this issue May 31, 2023 · 0 comments · Fixed by #244
Closed

[Bug] Suggestions popup is not closed after view change #241

nausharipov opened this issue May 31, 2023 · 0 comments · Fixed by #244
Assignees
Labels
bug Something isn't working P2 regression A bug that was not present in the original editor

Comments

@nausharipov
Copy link
Collaborator

Demonstration:
https://github.com/akvelon/flutter-code-editor/assets/31556582/327c4050-9021-469a-8b58-940127eef2fc

Reproducible example:

import 'package:flutter/material.dart';
import 'package:flutter_code_editor/flutter_code_editor.dart';
import 'package:flutter_highlight/themes/monokai-sublime.dart';
import 'package:highlight/languages/java.dart';

void main() {
  runApp(const CodeEditor());
}

final controller1 = CodeController(
  text: '',
  language: java,
);

final controller2 = CodeController(
  text: '',
  language: java,
);

final controller3 = CodeController(
  text: '',
  language: java,
);

class CodeEditor extends StatelessWidget {
  const CodeEditor({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: CodeTheme(
          data: CodeThemeData(styles: monokaiSublimeTheme),
          child: DefaultTabController(
            length: 3,
            child: Scaffold(
              appBar: AppBar(
                bottom: const TabBar(
                  tabs: [
                    Tab(icon: Icon(Icons.directions_car)),
                    Tab(icon: Icon(Icons.directions_transit)),
                    Tab(icon: Icon(Icons.directions_bike)),
                  ],
                ),
                title: const Text('Popup bug'),
              ),
              body: TabBarView(
                children: [
                  SingleChildScrollView(
                    child: CodeField(
                      controller: controller1,
                    ),
                  ),
                  SingleChildScrollView(
                    child: CodeField(
                      controller: controller2,
                    ),
                  ),
                  SingleChildScrollView(
                    child: CodeField(
                      controller: controller3,
                    ),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
@nausharipov nausharipov added bug Something isn't working regression A bug that was not present in the original editor P1 P2 and removed P1 labels May 31, 2023
@Malarg Malarg self-assigned this Jun 5, 2023
@nausharipov nausharipov assigned nausharipov and unassigned Malarg Jun 6, 2023
alexeyinkin added a commit that referenced this issue Jun 7, 2023
alexeyinkin added a commit that referenced this issue Jun 7, 2023
alexeyinkin added a commit that referenced this issue Jun 7, 2023
* _suggestionsCloseNotifier

* removed public notifier

* Auto-format, update Flutter version in CI (#241)

* Fix analyzer issues (#241)

* Fix tests (#241)

---------

Co-authored-by: Alexey Inkin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 regression A bug that was not present in the original editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants