Skip to content

Stops the agent view from autoscrolling down to the last message in the thread. Allows you to disable it without modifying core code.

Notifications You must be signed in to change notification settings

clonemeagain/osticket-plugin-preventautoscroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

osTicket plugin: Prevent Autoscroll

Stops agent ticket views from auto-scrolling to the last thread-entry.

Possibly overkill, but by making a plugin I am stopping myself from editing core.

Requirements: Install the AttachmentPreview plugin: https://github.com/clonemeagain/attachment_preview

That plugin exposes an API that lets other plugins edit the output of osTicket before it reaches the browser, this plugin needs that API.

How to enable

  • Download and unzip this plugin into your /include/plugins folder v1.0 zip v1.0 gzip
  • Use an admin account to visit /scp/plugins.php (Admin Panel => Manage => Plugins)
  • Select "Add new Plugin"
  • Press "Install" next to "Prevent Autoscroll"
  • Click the checkbox next to "Prevent Autoscroll"
  • From the "More dropdown" select "Enable"

Now test by visiting a ticket, due to pjax, you might need to refresh the page. The only change should be that the viewport no longer scrolls to the last thread entry. All other functionality should still work, let me know if it doesn't.

This plugin is not actually required

If you want this functionality without installing a plugin, simply edit /scp/js/thread.js

var thread = {

    options: {
        autoScroll: true,
        showimages: false
    },

    scrollTo: function (entry) {

       if (!entry) return;

       var frame = 0;
... snip ...

Modify it to:

var thread = {

    options: {
        autoScroll: true,
        showimages: false
    },

    scrollTo: function (entry) {
    
    	   return; // Prevent Autoscroll MOD

       if (!entry) return;

... snip ...

About

Stops the agent view from autoscrolling down to the last message in the thread. Allows you to disable it without modifying core code.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages