Skip to content

Instantly share code, notes, and snippets.

@jammykam
Last active September 8, 2017 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jammykam/87c2462af3d1902439e70701fc8b8e3d to your computer and use it in GitHub Desktop.
Save jammykam/87c2462af3d1902439e70701fc8b8e3d to your computer and use it in GitHub Desktop.
Sitecore 8 Experience Editor – Edit Component Properties causes page to jumps to top
Sitecore.PageModes.ChromeControls = Sitecore.PageModes.ChromeControls.extend({
renderCommandTag: function (command, chrome, isMoreCommand) {
var tag = this.base(command, chrome, isMoreCommand);
if (command.click.indexOf("chrome:") == 0) {
if (command.type == "common" || command.type == "datasourcesmenu" || command.type == "workflow") {
tag.click(function (e) {
e.stop();
});
}
}
return tag;
}
},
{
commandRenderers: Sitecore.PageModes.ChromeControls.commandRenderers,
eventNameSpace: Sitecore.PageModes.ChromeControls.eventNameSpace,
registerCommandRenderer: Sitecore.PageModes.ChromeControls.registerCommandRenderer
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment