Skip to content

Partial page load issue which prevent extending following button functionality using Application Customizer #6947

@mohammadamer

Description

@mohammadamer

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser Microsft Edge 90.0.818.42
  • SPFx version 1.11.0
  • Node.js version v10.24.0

Describe the bug / error

Page is not fully loaded which causes that elements like following button is not loaded in the DOM Content.
Following button is not loaded when trying to extend it's functionality by adding event handler to it.

Steps to reproduce

  1. create a simple Application Customizer
  2. In the public onInit(): Promise {}
  3. add a some code to add event hander to following button in a SharePoint Site home page
  4. Sample snippet to add click event handler

private registerFollowingButtonClickHandlers() {
// Registering the handlers
let followingButton = document.querySelector(
".ms-Button.ms-Button--action.ms-Button--command.ms-CompositeHeader-collapsible"
);
debugger;
followingButton.addEventListener("click", (e) => {
console.log("Following Button Clicked");
});
}

Expected behavior

Excepted behavior is to be able to extend the functionality of the following/Not following button in the SharePoint site home page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:archive-old-issueIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions