Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Ticket view automatically brings me to end of page when opened

When I click on a ticket number, the ticket page loads, and the browser takes me to the end of the page automatically. It's as if there was an anchor tag (which I couldn't find) and the page is taking me there. Is there a way to turn this off so I see the top of the ticket details first?

Comments

  • Q: Is there a way to turn this off so I see the top of the ticket details first?
    A: There is no toggle for this feature in the ui.  You can probably disable it by editing the javascript files though.  [I seem to recall someone else posting about how to do this when the feature was introduced a few years ago]
  • Any idea where? I've looked at scp.js and ticket.js with no luck. It's super annoying because it doesn't even work in Chrome. It takes me to the end of the original message.
  • I use Chrome and it works fine for me.  What version of osTicket are you running?  Also I have no idea where it is.  You would need to search the forums for the other post or dig through the code.
  • 1.9.14, latest Chrome 52. I will keep looking.. I narrowed it down to /scp/js/scp.js, but haven't found the culprit yet.. will keep everyone posted.
  • FOUND the problem! Line 40 of /scp/js/scp.js:

    $("input:not(.dp):visible:enabled:first").focus();

    Probably should be removed from osTicket since it doesn't make any sense to bring the user on an unread ticket directly to the reply box without being able to read the original message first.
  • Commenting that out it is all you need.
  • I have no idea why you think this should be removed... are you using osTicket on a extremely tiny screen or something?
  • No, I have a 23inch widescreen @ 1920 x 1080 res.

    Why it should be removed? Web pages in general tend to show the start of the page, not jump you to the footer. It would be like buying a new Kindle book, and when you open the cover, it automatically takes you to the last page of the book.

    Why do I want to click on a ticket and be taken to the footer? Or better yet.. why would *anyone* want this bug?
  • A good compromise might be to delete that line, and then add the autofocus attribute the the reply input form. That way people can still read the original ticket, but also start typing if they already know what they want to say without having to scroll.
  • To be clear, this is not a bug.  It is an intentional feature.  It is not one that I am particularly fond of, but it was also one of the most requested features and was implemented by the devs because of such.  Personally I would prefer to not have it, or to have it be a setting I can toggle.  To be clear it is not taking you to the footer.  I can't even see the footer when it scrolls [the footer is the copyright statement].

    With shops that have lots of Agents answering the same pool of tickets, or with extremely long tickets I can see this as being kinda annoying.  In most instances this feature saves me time by it taking me to the last response, but we only have three people answering tickets where I work.

    Also of note is that the control bar in 1.10 has a jump back to the top button.  As far as compromise, I disagree with you.  I think that the system should keep track if you as an agent has looked at ticket yet, and if you have scroll you.  If you have not then don't.  I also think that the feature should be able to be turned on and off at the Agent profile level, and by admin's in the admin panel.
  • I've recently upgraded to 1.10, so I found this issue again. Turns out the script in question is now in /scp/js/thread.js

    I recommend something easy to find again, like adding at line 23:

    console.log("MOD: Prevent auto-scrolling");
    return;

    Then you can find it again when upgrading. 

    I've added it to a plugin of my own, which simply overrides the script function: https://github.com/clonemeagain/osticket-plugin-preventautoscroll

    Load of "plugin-boilerplate" around what is essentially a function override.. but, it works, and is admin-toggleable. Will also survive an upgrade. Unless they change that function name, then I guess I'll just edit my plugin! :-)
Sign In or Register to comment.