Git Product home page Git Product logo

Comments (4)

jkillian avatar jkillian commented on July 16, 2024

+1
I'm encountering this issue as well. I don't know anything about the Brackets API, but I'm happy to submit a pull request if anyone can guide me in the right direction for the fix

from brackets-surround.

invokablegmbh avatar invokablegmbh commented on July 16, 2024

Just add
$('#surround_input').focus();
as a last line to the surround-function:

 function surround() {
        var _t = _getSelectedText(),
            _output = "";
        Dialogs.showModalDialogUsingTemplate(surroundHtml);
        $('#surround_input').keyup(function (e) {
            if (e.which === 13) {
                e.preventDefault();
                var _c = $('#surround_input').val();

                if (_c === null) {
                    return;
                }
                if (cases[_c] !== undefined) {
                    _output = _c + _t + cases[_c];
                } else {
                    if (_isHTML(_c)) {
                        if (_closeHTML(_c) === false) {
                            Dialogs.cancelModalDialogIfOpen('surround_input');
                            return;
                        }
                        _output = _c + _t + _closeHTML(_c);
                    } else {
                        _output = _c + _t + _c;
                    }
                }
                $('.surround_input').fadeOut(300);
                Dialogs.cancelModalDialogIfOpen('surround_input');
                _replaceActiveSelection(_output);
            }
        });
        $('#surround_input').focus();
    }

from brackets-surround.

jkillian avatar jkillian commented on July 16, 2024

Thanks jarmediagmbh. Just wanted to point out that this pull request will fix the issue if merged.

from brackets-surround.

pedelman avatar pedelman commented on July 16, 2024

This has been resolved, thanks for the feedback. If you had it previously installed through the extensions registry, you can now update and it should work as intended.

from brackets-surround.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.