Page MenuHomePhabricator

[Regression] "View history" should move in and out of the p-cactions menu depending on window (re)size
Closed, ResolvedPublic

Description

screenshot of insuffecient horizontal space, yet history tab not being moved into tab.

Showed as anonymous user (non-secure) on Safari 4. Works as logged in user (secure).

Worked in both cases on 1.17


Version: unspecified
Severity: normal

Attached:

Screen_shot_2011-09-28_at_17.22.37.png (97×513 px, 15 KB)

Details

Reference
bz31212

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:56 PM
bzimport set Reference to bz31212.
bzimport added a subscriber: Unknown Object (MLST).

Was reported by other Dutch wiki users btw. and confirmed and filed by me.

When starting the screen with a small window and then opening the page does make it animate to the drop down btw. Subsequently widening the window however does then leave the history element stuck in the drop down, so it is specifically the resize event that should recalculate and repositioning that isn't working, the initial calculation is working.

Created attachment 9213
Proposed patch

Don't ask me why, but inserting an undefined fixes the issue.

Attached:

removing dep on tarball blockers for things that aren't in mw core.

Well duh !!!

delayedBind: function( timeout, event, data, callback )

So I guess michael's patch should do the trick, though it's probably better to have 'null' there instead.

/**

  • Bind a callback to an event in a delayed fashion.
  • In detail, this means that the callback will be called a certain
  • time after the event fires, but the timer is reset every time
  • the event fires.
  • @param timeout Number of milliseconds to wait
  • @param event Name of the event (string)

---> * @param data Data to pass to the event handler (optional) <--

  • @param callback Function to call
	 */

delayedBind: function( timeout, event, data, callback ) {

The parameter's explicitly listed as optional. Is something broken in the function that's making the optionalness not work? (For instance... it doesn't appear to actually be optional in the code.)

I've made further changes in r105007 to undo r104671 and fix jquery.delayedBind() to work correctly with jQuery 1.6.x.

Patch probably needs merging to 1.18 and 1.18wmf1; tagged the rev.