diff --git a/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/setfocus/.content.xml b/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/setfocus/.content.xml
index b35abde581..b5f739889d 100644
--- a/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/setfocus/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/dam/formsanddocuments/core-components-it/samples/setfocus/.content.xml
@@ -1,23 +1,24 @@
-
-
-
+jcr:primaryType="dam:Asset">
+
+
+
+
\ No newline at end of file
diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml
index 28a016478b..5353bccbb4 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/setfocus/.content.xml
@@ -1,221 +1,326 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+jcr:primaryType="cq:Page">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"/>
+
+
+
+
+
+
+
+
+()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"/>
+
+
+
+
+
+sdfbgd</p>
"/>
+
+
+adsgsg</p>
"
+visible="{Boolean}true"/>
+
+
+
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js
index bf4762f1ec..6f0591c7a6 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/text/v1/text/clientlibs/site/js/textview.js
@@ -60,6 +60,7 @@
setFocus() {
this.setActive();
+ this.element.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
updateValue(value) {
diff --git a/ui.tests/test-module/specs/setFocusTests.runtime.spec.js b/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
index d96a8ae034..f1a8948044 100644
--- a/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
+++ b/ui.tests/test-module/specs/setFocusTests.runtime.spec.js
@@ -25,26 +25,8 @@ describe("Form with multipe components", () => {
})
});
- const checkHTML = (id, state, view, count) => {
- const visible = state.visible;
- const passVisibleCheck = `${visible === true ? "" : "not."}be.visible`;
- cy.get(`#${id}`)
- .should(passVisibleCheck)
- .invoke('attr', 'data-cmp-visible')
- .should('eq', visible.toString());
- cy.get(`#${id}`)
- .invoke('attr', 'data-cmp-enabled')
- .should('eq', state.enabled.toString());
- expect(state.items.length, "model has children equal to count").to.equal(count);
- if (count == 0) {
- return cy.get(`.${childBemBlock}`).should('not.exist');
- } else {
- return cy.get(`.${childBemBlock}`).should('have.length', count);
- }
- };
-
it("check if first tab activated if focus call from other tab", () => {
- const firstChildComponentId = formContainer._model.items[7].items[1].items[0].id;
+ const firstChildComponentId = formContainer._model.items[8].items[2].items[0].id;
const firstChildComponentButtonId = formContainer._model.items[0].id ;
cy.get(`#${firstChildComponentButtonId}`).click();
cy.get(`#${firstChildComponentId}`).isElementInViewport().should("eq", true);