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

[html] Format onPaste issues with HTML #21218

Closed
HunterMitchell opened this issue Feb 22, 2017 · 2 comments
Closed

[html] Format onPaste issues with HTML #21218

HunterMitchell opened this issue Feb 22, 2017 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug html HTML support issues verified Verification succeeded
Milestone

Comments

@HunterMitchell
Copy link

HunterMitchell commented Feb 22, 2017

  • VSCode Version: Code 1.9.1 (f9d0c68, 2017-02-09T00:26:45.394Z)
  • OS Version: Windows_NT ia32 10.0.14393

Steps to Reproduce:

  1. Create an HTML document like below
    image

  2. Copy the nested-content div
    image

  3. Since we copied the spacing on the left (along with the text), we should be able to place our cursor to the very left and paste (or even just paste). Instead of the correct formatting we get something like this:
    image

    or this (without moving the text cursor)
    image

I assume this is an issue with the newer format feature, but I could be wrong.

@aeschli aeschli assigned rebornix and unassigned aeschli Feb 23, 2017
@kieferrm kieferrm mentioned this issue Mar 3, 2017
58 tasks
@warpdesign
Copy link
Contributor

warpdesign commented Mar 4, 2017

I'm not sure this should go there but one nice thing I noticed about Java IDE is the fact that when pasting text inside a string, the pasted string is escaped if necessary.

So, pasting I'm doing well here:

let message = 'paste here: ';

would result in:

let message = 'paste here: I\'m doing well';

@kzhui125
Copy link

kzhui125 commented Mar 8, 2017

I have an issue with formatOnPaste:
copy the following code into <script></script> with "editor.formatOnPaste": true, it looks not good
(function() {
var updateButton = document.getElementById('updateDetails');
var cancelButton = document.getElementById('cancel');
var favDialog = document.getElementById('favDialog');

// Update button opens a modal dialog
updateButton.addEventListener('click', function() {
favDialog.showModal();
});

// Form cancel button closes the dialog box
cancelButton.addEventListener('click', function() {
favDialog.close();
});
})();

1

@egamma egamma added html HTML support issues bug Issue identified by VS Code Team member as probable bug labels Apr 5, 2017
@egamma egamma added this to the April 2017 milestone Apr 5, 2017
@aeschli aeschli changed the title Format onPaste issues with HTML [html] Format onPaste issues with HTML Apr 12, 2017
@rebornix rebornix removed their assignment Apr 12, 2017
@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Apr 27, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug html HTML support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants