Skip to content
Snippets Groups Projects
Unverified Commit bf51490e authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3089752 by bnjmnm, zrpnr: Follow-up to #3074267 Refactor use of...

Issue #3089752 by bnjmnm, zrpnr: Follow-up to #3074267 Refactor use of classList in quickedit for browser compatibility
parent b12a3a59
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards
......@@ -299,9 +299,9 @@
function refinePopper(data) {
// Determine if the pointer should be on the top or bottom.
const isBelow = data.offsets.popper.top > data.offsets.reference.top;
data.instance.popper.classList.toggle(
const classListMethod = isBelow ? 'add' : 'remove';
data.instance.popper.classList[classListMethod](
'quickedit-toolbar-pointer-top',
isBelow,
);
// Don't position the toolbar past the first or last editable field if
// the entity is the target.
......
......@@ -165,7 +165,8 @@
function refinePopper(data) {
var isBelow = data.offsets.popper.top > data.offsets.reference.top;
data.instance.popper.classList.toggle('quickedit-toolbar-pointer-top', isBelow);
var classListMethod = isBelow ? 'add' : 'remove';
data.instance.popper.classList[classListMethod]('quickedit-toolbar-pointer-top');
if (that.$entity[0] === data.instance.reference) {
var $field = that.$entity.find('.quickedit-editable').eq(isBelow ? -1 : 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment