diff --git a/src/services/services.ts b/src/services/services.ts
index 9a6afb5f1e0..3eb5ec319ad 100644
--- a/src/services/services.ts
+++ b/src/services/services.ts
@@ -3311,11 +3311,24 @@ namespace ts {
let start = new Date().getTime();
let result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken) ||
isSolelyIdentifierDefinitionLocation(contextToken) ||
- isDotOfNumericLiteral(contextToken);
+ isDotOfNumericLiteral(contextToken) ||
+ isInJsxText(contextToken);
log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start));
return result;
}
+ function isInJsxText(contextToken: Node): boolean {
+ if (contextToken.kind === SyntaxKind.JsxText) {
+ return true;
+ }
+
+ return contextToken.kind === SyntaxKind.GreaterThanToken &&
+ contextToken.parent &&
+ (contextToken.parent.kind === SyntaxKind.JsxOpeningElement ||
+ contextToken.parent.kind === SyntaxKind.JsxSelfClosingElement ||
+ contextToken.parent.kind === SyntaxKind.JsxClosingElement);
+ }
+
function isNewIdentifierDefinitionLocation(previousToken: Node): boolean {
if (previousToken) {
let containingNodeKind = previousToken.parent.kind;
diff --git a/tests/cases/fourslash/tsxCompletion9.ts b/tests/cases/fourslash/tsxCompletion9.ts
new file mode 100644
index 00000000000..dbb6c46293b
--- /dev/null
+++ b/tests/cases/fourslash/tsxCompletion9.ts
@@ -0,0 +1,18 @@
+///