mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-13 18:15:48 +02:00
Fix user profile modals not closing with back mouse button
This commit is contained in:
parent
fba734fd5a
commit
c10e0df898
@ -496,11 +496,16 @@
|
||||
return $(selector, parent).click().length;
|
||||
};
|
||||
|
||||
var tryCloseModal = function(){
|
||||
var tryCloseModal1 = function(){
|
||||
var modal = $("#open-modal");
|
||||
return modal.is(":visible") && tryClickSelector("a[rel=dismiss]", modal);
|
||||
};
|
||||
|
||||
var tryCloseModal2 = function(){
|
||||
var modal = $(".js-modals-container");
|
||||
return modal.length && tryClickSelector("a.mdl-dismiss", modal);
|
||||
};
|
||||
|
||||
var tryCloseHighlightedColumn = function(){
|
||||
if (highlightedColumnEle){
|
||||
var column = highlightedColumnEle.closest(".js-column");
|
||||
@ -510,7 +515,8 @@
|
||||
|
||||
window.TDGF_onMouseClickExtra = function(button){
|
||||
if (button === 1){ // back button
|
||||
tryCloseModal() ||
|
||||
tryCloseModal1() ||
|
||||
tryCloseModal2() ||
|
||||
tryClickSelector(".js-inline-compose-close") ||
|
||||
tryCloseHighlightedColumn() ||
|
||||
tryClickSelector(".js-app-content.is-open .js-drawer-close:visible") ||
|
||||
|
Loading…
Reference in New Issue
Block a user