Skip to content
Snippets Groups Projects
Unverified Commit 9b61736e 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

(cherry picked from commit bf51490e)
parent c9a231cc
Branches
Tags
9 merge requests!1445Issue #2920039: Views' User Name exposed group filter validation,!1298Issue #3240993: Let layout builder render inline block translations,!774Issue #3174569: Example node template file name is incorrect,!497Issue #2463967: Use .user.ini file for PHP settings,!433Resolve #3163663 "Too many open files",!233Resolve #2693787 "Taxonomy term name",!133Resolve #2666286 "Clean up menuui",!112Resolve #3187004 "Drupaldatetime serialization issue",!53Resolve #3181870: Correct typo "the the" in "core/classList" deprecation message.
......@@ -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