mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 18:05:45 +03:00
Pledge edit button: Style the dialog on small screens
This commit is contained in:
parent
be62f41e43
commit
c703c7cefa
3 changed files with 27 additions and 2 deletions
|
@ -20,6 +20,13 @@ jQuery( document ).ready( function( $ ) {
|
|||
const bounds = button.getBoundingClientRect();
|
||||
const modalWidth = 300; // Modal width is hardcoded, because it's not visible yet.
|
||||
|
||||
if ( button.closest('.wp-block-wporg-pledge-edit-button') ) {
|
||||
return {
|
||||
top: bounds.y + offsetTop + bounds.height,
|
||||
left: bounds.x + offsetLeft,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
top: bounds.y + offsetTop + bounds.height,
|
||||
left: bounds.x + offsetLeft + bounds.width - modalWidth,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue