3

I am doing maintenance on a SP2013 On Premises site, and I have been asked to review an issue with the "My Settings" link not working on Chrome. On IE11 and Firefox, it is sending the user to their profile page, but on Chrome, nothing happens.

Here´s how the HTML element is rendered:

<li type="option" iconsrc="/_layouts/15/images/menuprofile.gif?rev=23" onmenuclick="javascript:GoToPage('\u002f_layouts\u002f15\u002fuserdisp.aspx?Force=True');return false;" text="My Settings" description="Update your user information, language and regional settings, and alerts." menugroupid="100" enabled="true" checked="false" onmenuclick_original="javascript:GoToPage('\u002f_layouts\u002f15\u002fuserdisp.aspx?Force=True');return false;" text_original="My Settings" description_original="Update your user information, language and regional settings, and alerts." valorig="" id="mp1_0_0" class="ms-core-menu-item  ">
    <a class="ms-core-menu-link" id="mp1_0_0_Anchor" href="javascript:;" onclick="return false;" title="My Settings">
        <div class="ms-hide"><img src="/_layouts/15/images/menuprofile.gif?rev=23" alt="" title="" id="mp1_0_0_ICON"></div>
        <div class="ms-core-menu-label" id="zz2_ID_PersonalInformation">
            <span class="ms-core-menu-title">My Settings</span>
            <span></span>
        </div>
        <span class="ms-accessible"></span>
        <div></div>
    </a>
</li>

No error on browser´s console. Any thoughts on why this is happening?

3
  • I have the solution, do you still need it? Commented Jan 28, 2015 at 15:22
  • I too have the same issue. Did you have any solution please share it. Commented Mar 3, 2015 at 12:30
  • @ChrisCannon Yes, please :)
    – Gonzalo
    Commented Mar 3, 2015 at 12:40

1 Answer 1

4

After some investigations I found that the menu item "My Settings" doesn't work on Chrome because the click handler has a "return false;" instruction after the first function call.

The menu is generated dynamically from the ie:menuitem tags. The tag corresponding to the "My Settings" button is :

<ie:menuitem id="zz2_ID_PersonalInformation" type="option" iconsrc="/_layouts/15/images/menuprofile.gif?rev=40" onmenuclick="javascript:GoToPage('\u002f_layouts\u002f15\u002fuserdisp.aspx?Force=True');return false;" text="My Settings" description="Update your user information, language and regional settings, and alerts." menugroupid="100"></ie:menuitem>

To fix the problem, i loop through the tags to remove the "return false;" instruction in the onclickmenu attribute. My code using jQuery :

$welcomeMenu = $("#suiteBar").find("#welcomeMenuBox");
$menuItems = $welcomeMenu .find("ie\\:menuitem");
$menuItems.each(function(){
    $item = $(this);
    var onmenuclickAttr = $item.attr("onmenuclick").replace("return false;","");
    $item.attr("onmenuclick", onmenuclickAttr);
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.