Skip to content

Commit

Permalink
Fixed surveyjs/survey-creator#4426 - Responsive UI - The focus remain…
Browse files Browse the repository at this point in the history
…s on a design surface when using the keyboard to activate a Properties panel
  • Loading branch information
tsv2013 committed Aug 7, 2023
1 parent a0cca11 commit b874b55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/survey-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ export class SurveyElement<E = any> extends SurveyElementCore implements ISurvey
const { root } = settings.environment;
if (!root) return false;
const el = root.getElementById(elementId);
if (el && !(<any>el)["disabled"] && el.style.display !== "none") {
// https://stackoverflow.com/questions/19669786/check-if-element-is-visible-in-dom
if (el && !(<any>el)["disabled"] && el.style.display !== "none" && el.offsetParent !== null) {
el.focus();
return true;
}
Expand Down

0 comments on commit b874b55

Please sign in to comment.