MyBB Community Forums

Full Version: Quick Edit and Full Edit Buttons Positioned Incorrectly - Offset Problem with jQuery
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I'm having some strange issues with one of my forums running MyBB 1.8.20.  As you can see in the screenshot below, when you click on the edit button for a post, the "Quick Edit" and "Full Edit" options are shown in a strange position (shown in the screenshots below - click on the thumbnails to enlarge).  This happens in all of my browsers (Firefox, Chrome, IE):

[Image: 1087_KtLElj_offset_calcs_are_wrong_mybb_...l_edit.png]

The problem seems to be with jQuery's offset calculations, as using el.get(0).offsetTop returns the correct top offset value while el.offset() is returning the wrong numbers as shown in this screenshot.

[Image: 1086_ywZ6Gd_offset_calcs_are_wrong_mybb.png]

So does anyone know why I'd be running into this problem?


OK, figured it out. I had set

position: relative;

for the .wrapper { } container in the global.css file for one of my themes.

This set the top of the buttons relative to that div which is not correct. That's why the offset was off. Fixed it Smile
Its an old issue which has never been addressed for some unknown reason:

I personally like to replace the default dropdown with my own.