Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM 6.5. Authoring - 'New Tab' behavior

dbasic
Level 2
Level 2

Hi everybody,

 

Is there any way to prevent the following behavior in AEM (AEM 6.5):

1) login and go to Sites console

2) select some page and click on Page Properties button. Page Properties form is loaded in the current browser tab

3) click on Cancel button inside Page Properties form

Actual behavior: Sites Console is opened in a new browser tab, and in the current browser tab Page Properties form is still present

Expected behavior: Sites Console should be opened in the current browser tab

 

The same behavior is present in Create Page wizard. By clicking Cancel button in the first step, Sites Console is opened in the new browser tab instead of the current one.

 

1 Accepted Solution
Anudeep_Garnepudi
Correct answer by
Community Advisor
Community Advisor

Hi @dbasic 

AEM will not add _target=blank attribute. Check the following

  1. granite/ui/components/shell/propertiespage/propertiespage.jsp anchor tag attributes
  2. Check the java script files loading on page, as @Arun_Patidar said verify if there are any non OOTB scripts are loading on pageScreenshot 2020-10-26 at 2.25.28 PM.png 

As cancel button is the only anchor tag on those two pages, might need to do debug deep.

-AG

View solution in original post

1 Reply
Sandeep6
Level 5
Level 5

Hi @dbasic ,

 

I am also using AEM 6.5.

I am not facing anything what you explained in your query. For me Sites Console is opening  in the current browser tab after clicking on cancel button  in both the cases.. Please check if you are clicking cancel button with ctrl.

 

Thanks,

Sandeep.

dbasic
Level 2
Level 2
Hi Sandeep, thank you for the reply. No, I do not hold Ctrl button. What I've observed is that Cancel button is rendered as anchor with target=_blank attribute. That's the reason.
Sandeep6
Level 5
Level 5

Hi , 

I am not able to see any anchor tag in my instance .

 Capture.PNG

dbasic
Level 2
Level 2

Hi Sandeep,

 

This is the markup rendered on my local instance:

Screen Shot 2020-10-23 at 11.15.32 AM.png

dbasic
Level 2
Level 2

Hi Sandeep, here it is

Screen Shot 2020-10-23 at 11.27.01 AM.png

 

SP6 has been applied but this "issue" is present even before that. What's interesting is that on one of our test environments we do not have such "issue", ie. it works without opening new browser tabs. So, I'm wondering if it's somewhere a config for that ... ?

Arun_Patidar
Community Advisor
Community Advisor

Is there javascrip or jquery which converting all the links and adding target=_blank attribute?

Can you try in another browser?

dbasic
Level 2
Level 2
Hi Arun, no there's no custom JS code. On one of our TEST env everything works as expected and the codebase it the same as on my local box. Yes, I've also tried with another browser but nothing is different.
Anudeep_Garnepudi
Correct answer by
Community Advisor
Community Advisor

Hi @dbasic 

AEM will not add _target=blank attribute. Check the following

  1. granite/ui/components/shell/propertiespage/propertiespage.jsp anchor tag attributes
  2. Check the java script files loading on page, as @Arun_Patidar said verify if there are any non OOTB scripts are loading on pageScreenshot 2020-10-26 at 2.25.28 PM.png 

As cancel button is the only anchor tag on those two pages, might need to do debug deep.

-AG

View solution in original post

SwonVIP
Level 2
Level 2

Hello there!

Default OOTB behavior on a fresh 6.5 instance should actually be the way like you have described it. Never had any issues with it. Maybe you got some browser extensions for that? Have you also tried it with another user in the Incognito browser tab?


In general my advice would be to never customize functions like this since it might lead to a lot of issues also in conjunction with product updates. You should stay as close as possible to the OOTB behavior AEM-wise at least.

Greetings!