mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
fix: type error in uneditable bubbles (#6092)
This commit is contained in:
@@ -219,10 +219,14 @@ const isTargetInput = function(e) {
|
||||
|
||||
if (e.target instanceof HTMLInputElement) {
|
||||
const target = e.target;
|
||||
return target.type === 'textarea' || target.type === 'text' ||
|
||||
target.type === 'number' || target.type === 'email' ||
|
||||
target.type === 'password' || target.type === 'search' ||
|
||||
target.type === 'tel' || target.type === 'url';
|
||||
return target.type === 'text' || target.type === 'number' ||
|
||||
target.type === 'email' || target.type === 'password' ||
|
||||
target.type === 'search' || target.type === 'tel' ||
|
||||
target.type === 'url';
|
||||
}
|
||||
|
||||
if (e.target instanceof HTMLTextAreaElement) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -931,7 +931,9 @@ const Bubble = class {
|
||||
// This cannot be done until the bubble is rendered on screen.
|
||||
const maxWidth = paragraphElement.getBBox().width;
|
||||
for (let i = 0, textElement;
|
||||
(textElement = paragraphElement.childNodes[i]); i++) {
|
||||
(textElement = /** @type {!SVGTSpanElement} */ (
|
||||
paragraphElement.childNodes[i]));
|
||||
i++) {
|
||||
textElement.setAttribute('text-anchor', 'end');
|
||||
textElement.setAttribute('x', maxWidth + Bubble.BORDER_WIDTH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user