mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-23 18:29:35 +00:00
Don't show page previews on hash fragments
Bug: T198652 Change-Id: I036266bf4fb98ffa20509440e553b29e8dcc4e1f
This commit is contained in:
parent
c9366fda5d
commit
7ab0b63f80
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map.json
vendored
BIN
resources/dist/index.js.map.json
vendored
Binary file not shown.
10
src/index.js
10
src/index.js
|
@ -43,7 +43,15 @@ const EXCLUDED_LINK_SELECTORS = [
|
|||
'.mw-cite-backlink a',
|
||||
'.oo-ui-buttonedElement-button',
|
||||
'.ve-ce-surface a', // T259889
|
||||
'.cancelLink a'
|
||||
'.cancelLink a',
|
||||
// T198652: lists to hash fragments are ignored.
|
||||
// Note links that include the path will still trigger a hover,
|
||||
// e.g. <a href="Foo#foo"> will trigger a preview but <a href="#foo"> will not.
|
||||
// This is intentional behaviour that will not be handled by page previews, to avoid
|
||||
// introducing complex behaviour. If a link must include the path it should make use of
|
||||
// the .mw-selflink-fragment class.
|
||||
'.mw-selflink-fragment',
|
||||
'[href^="#"]'
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue