Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll to .fullimg on click @ .imgpreview [mobile] #42

Merged
merged 2 commits into from
Jan 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions code/smartphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,16 @@ window.runOnSmartphonesAfterBoot = function() {
// init msg of status bar. hint for the user that a tap leads to the info screen
$('#mobileinfo').html('<div style="text-align: center"><b>tap here for info screen</b></div>');

// disable img full view
$('div[class=imgpreview]').off('click', '**');
// replace img full view handler
$('#portaldetails')
.off('click', '.imgpreview')
.on('click', '.imgpreview', function(e) {
if (e.currentTarget === e.target) { // do not fire on #level
$('.ui-tooltip').remove();
var newTop = $('.fullimg').position().top + $("#sidebar").scrollTop();
$("#sidebar").animate({ scrollTop: newTop }, 200);
}
});

// make buttons in action bar flexible
var l = $('#chatcontrols a:visible');
Expand Down