Giter Site home page Giter Site logo

Comments (12)

lsharir avatar lsharir commented on June 2, 2024 1

Awesome, thanks man.
Installed 0.3.8 and it works fine!

from vscode-auto-close-tag.

formulahendry avatar formulahendry commented on June 2, 2024

Interesting bug, but I cannot repro it in my side. Could you please disable all other extensions and try again? I just want to make sure no other extension affect on this.

from vscode-auto-close-tag.

lsharir avatar lsharir commented on June 2, 2024

It happens to me too, even with all other extensions disabled (and workspace reloaded)

Weird thing is, it happens to existing files only, if I copy the content of a file where this happens to a new html file, it won't happen.

If I take an existing file where it happens. Even reducing the file to a simple:

<div>
</div>

will trigger the bug if you leave the cursor on the end of the <div>

from vscode-auto-close-tag.

shjyh avatar shjyh commented on June 2, 2024

me too.
and I set autosave onFocusChange.

from vscode-auto-close-tag.

formulahendry avatar formulahendry commented on June 2, 2024

Oh.. Still could not repro in my side even I set autosave onFocusChange. 🤔 Could you please let me know your Auto Close Tag version, VSCode version, OS info and other user settings you set in VSCode if possible. I want to see if there are some similar things in your side.

from vscode-auto-close-tag.

shjyh avatar shjyh commented on June 2, 2024

@formulahendry
last version vscode on OS X 10.11.6.

it happens with all other extensions disabled and reset custom settings.json

from vscode-auto-close-tag.

formulahendry avatar formulahendry commented on June 2, 2024

Hi all, to help troubleshoot this issue, could you please unzip the attached zip and install the vsix:
auto-close-tag-0.3.7.zip
Then try to repro the issue and show me the log by opening the developer console in the top menu bar: 'Help'-> 'Toggle Developer Tools':
image

from vscode-auto-close-tag.

lsharir avatar lsharir commented on June 2, 2024

Here is the console after changing the tab back to the html file with:

<div>|

</div>

cursor where the | pipe is

note that the text captured is the original file as committed (I show the bug after I deleted all lines and added only the <div></div> there

screen shot 2016-12-30 at 9 58 24 am

from vscode-auto-close-tag.

shjyh avatar shjyh commented on June 2, 2024

@formulahendry
I think i know what's wrong with it and It's very weird.
maybe it's a bug vscode ide itself.(i don't know will it happend on windows?).

the text prop in event.contentChanges[0] is strange if project works with git. ( I debug your code on my machine ).
if a file is in version control, the event.contentChanges[0].text give me the whole file text....en..for example:

create test.html

<html>
    <head>

    </head>
    <body>
    </body>
</html>

then

git add test.html

Event.contentChanges [0] .text returns me the entire file code, and the html is endsWith> . IsRightAngleBracket is equal to true.

More seriously, contentChange.text always returns the same html string (after tab change) before making changes using git add test.html!!

This means that adding a blank line at the end of the file does not solve the problem unless you exec git add.

from vscode-auto-close-tag.

formulahendry avatar formulahendry commented on June 2, 2024

Thanks @shjyh and @lsharir for the very helpful information! 🙂 This should be the vscode bug. 🙄 Despite that, for quick turnaround, I have provided a hotfix in the extension side to eliminate this issue. You could install the latest version and have a try. 😎

from vscode-auto-close-tag.

formulahendry avatar formulahendry commented on June 2, 2024

I have created an issue for VS Code team. Keep this issue open for tracking.

from vscode-auto-close-tag.

alexey-kozlenkov avatar alexey-kozlenkov commented on June 2, 2024

Yeah, looks great.
Thanks a lot!

from vscode-auto-close-tag.

Related Issues (20)

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.