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

Cannot click on line with inline decoration #46942

Closed
alexdima opened this issue Mar 29, 2018 · 3 comments
Closed

Cannot click on line with inline decoration #46942

alexdima opened this issue Mar 29, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-core Editor basic functionality verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

  • Run the extension
  • Open a document with an empty 1st line
  • Run the below command from the command palette
  • Click anywhere on the line that has the decorator
  • Attempt to type in the document
const vscode = require('vscode');

exports.activate = function () {
    vscode.commands.registerCommand('inline_decorator_1st_line', () => {
        placeInlineDecoratorOn1stLine();
    });
};

function placeInlineDecoratorOn1stLine() {
    // Make sure the 1st line is empty to repro the issue
    const editor = vscode.window.activeTextEditor;
    const range = new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 0));
    const decorationType = vscode.window.createTextEditorDecorationType({
        before: {
            contentText: "b",
            color: "yellow",
            textDecoration: "none; position: absolute;",
        }
    });
    editor.setDecorations(decorationType, [range]);
}
@alexdima alexdima self-assigned this Mar 29, 2018
@alexdima alexdima added this to the April 2018 milestone Mar 29, 2018
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Mar 29, 2018
@alexdima alexdima added the editor-core Editor basic functionality label Apr 9, 2018
alexdima added a commit that referenced this issue Apr 9, 2018
@Priya91
Copy link

Priya91 commented Apr 25, 2018

@alexandrudima How does the added commit fix the issue? How should we use that API?

@alexdima
Copy link
Member Author

@Priya91 What do you mean? This commit does not add new API, it fixes a case where clicking on an empty line with an inline decoration would not focus the editor.

@isidorn isidorn added the verified Verification succeeded label Apr 26, 2018
@Priya91
Copy link

Priya91 commented Apr 26, 2018

@alexandrudima I was looking at the referenced commit 150b85b and misunderstood that this was the fix, so got confused. The second commit clarifies, thanks.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 24, 2018
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 editor-core Editor basic functionality verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants