Update the 'expandedWidth' after we expand in case someone was brazen
enough to change the tab's contents after the page load (gasp).
This doesn't prevent a tab from collapsing back and forth once, but at
least it won't continue to do that forever. This should reduce the
issue from completely awful to mildly annoying.
Bug: T71729
Change-Id: I46bd6584c0f2ddebc4aa7d1103cff1715e1510a5
This fixes the display of the tabs when `box-sizing: border-box` is
specified in local CSS. Previously, they were shifted upwards and shrunk
slightly.
Bug: T104767
Change-Id: I04333300bd1d29003e609091e0f64a73489f04c6
The Vector skin's responsive mode originally used 768px as a hardcoded
value for the media query set up in skin.json. I attempted to
switch to the @deviceWidthTablet global Less variable provided by
MediaWiki inside skin.json, but this would not work under any
circumstances. Evidently, ResourceLoader does not compile Less, so
it just ignores the media query if it contains a Less variable.
I was forced to leave the media query within skin.json blank
and hard-code it into responsive.less. When using the
@deviceWidthTablet variable inside responsive.less, it worked
fine. Obviously this is not ideal, as I am bypassing ResourceLoader,
but I have no other choice. See this comment (T124994#2864136) for
details.
Bug: T124994
Change-Id: I28565e5ba88be41dcd9cb38fc09cffe29d263e06
* Rename 'rtl' to 'isRTL' and use DOM to compute its value.
* Document code with JSDuck similar to other extensions.
* Remove unused 'prevElement' property. Not used in Vector
nor anywhere else in Wikimedia Git.
* Make 'boundEvent' property private. Not used anywhere in
Wikimedia Git outside this file.
* Simplify 'instances' tracking.
The jQuery object stored in this property wasn't used beyond
calling each(). Convert to a plain array.
Preserve and re-use the jQuery object first created
by collapsibleTabs().
* Simplify calculateTabDistance() by using getElementById() and
getBoundingClientRect(). Its support includes IE 5.
The "new" version (since Firefox 3.5 and IE 9) also includes
'height' and 'width' properties and is supported in all
browsers supported by the MediaWiki 1.28 startup feature test.
This helps avoid code in offset() and width(), which is fairly
expensive in jQuery 1.x.
* moveToCollapsed()
- Remove redundant jQuery object creation (only caller passes a
jQuery object already).
- Remove redundant re-receiving of expContainerSettings inside
the animate() callback. Already in the main scope.
Relates to a bunch of patches that work around a problem
caused by use of remove() instead of detach() in an earlier
version of the code. Which was only a problem because the
other settings object was also not used from the main scope.
(See pre-Gerrit commits 1f93310e and e7900807.)
Change-Id: I48d542580d767df2d17ce4c6668e9e233a0f7902
> JQMIGRATE: jQuery.fn.bind() is deprecated
Note that bind() is not removed in v3, merely deprecated.
Even after the jQuery Migrate phase, it will continue to work.
https://jquery.com/upgrade-guide/3.0/
Ref I3c3dedaa.
Bug: T124742
Change-Id: I6bbd8f829ecf987228c6a5abd32c84e4e088a9bd