1
0
mirror of synced 2024-11-25 06:16:08 +03:00
select2/src/js
Kevin Brown 2c5467b38c Fixes error when getting offset of element not in document
This fixes an error which is called out in jQuery Migrate but
probably never happens in real life. This is because we call
`jQuery.fn.offset` without checking if the element is in the
document. Based on testing done here and within the MediaWiki
team, I'm pretty sure jQuery never actually implemented explicit
checks and this jQuery Migrate warning is just to cover the case
where a browser might start returning inconsistnet results. And
we could at least reproduce the inconsistency, so that's something.

We now default the offset to 0/0 if the parent element happens to
not be in the document. This appears to be what jQuery used to do
in the past, and generally appears to be what people expect in
these cases.

This fixes #5584.
2019-09-18 21:33:13 -04:00
..
select2 Fixes error when getting offset of element not in document 2019-09-18 21:33:13 -04:00
banner.end.js Overhaul of the AMD integration 2015-03-14 19:05:24 -04:00
banner.start.js Overhaul of the AMD integration 2015-03-14 19:05:24 -04:00
jquery.mousewheel.shim.js fix error: "Uncaught ReferenceError: require is not defined" 2015-04-02 10:29:22 -04:00
jquery.select2.js Fixed EOL to Unix format. 2016-05-06 14:54:13 -07:00
jquery.shim.js Fix undefined variables 2015-02-13 22:49:54 -05:00
wrapper.end.js Fix TypeError 2015-03-18 10:48:47 -04:00
wrapper.start.js Add ; before beginning of factory wrapper (#5089) 2017-10-25 23:17:05 -04:00