ShareLinks: stop injecting the guest-link button into form dialogs
The action-sheet fallback matched any dialog with 2+ buttons, which caught the Add to Collection dialog and stuck a Create guest link button next to OK. Skip containers that have a select/text input/ textarea, since real action sheets are just a list of buttons/links.
Cette révision appartient à :
@@ -423,6 +423,10 @@
|
||||
}
|
||||
|
||||
function looksLikeActionContainer(node) {
|
||||
if (node.querySelector('select, input:not([type="checkbox"]):not([type="radio"]), textarea')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var actions = Array.from(node.querySelectorAll('button, a, [role="menuitem"], [role="option"], .actionsheetMenuItem, .paperListButton'))
|
||||
.filter(isVisible);
|
||||
return actions.length >= 2 && actions.length <= 40;
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur