Skip to content

Commit

Permalink
Pac scrolling patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Aug 14, 2020
1 parent cadc3fa commit a20123e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
html {
overflow-y: scroll;
width: 100%;
min-height: 100%;
-webkit-overflow-scrolling: touch;
}

Expand Down Expand Up @@ -199,6 +200,7 @@
margin: 1px;
margin-bottom: 50px;
/*height: 100%;*/
/*TODO: do not DARE uncomment line 201. May scrolling bug hit you very hard! */
}

.pa-bottom {
Expand Down
21 changes: 18 additions & 3 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -69009,8 +69009,8 @@ module.exports = perspectiveHandler;
}
do_INT(translations);

let ism = true;
//let ism = isMobile();
//let ism = true;
let ism = isMobile();
let isi = isiOS();

const preventDefault = e => e.preventDefault();// When rendering our container
Expand Down Expand Up @@ -69066,6 +69066,7 @@ else {
$("body").removeClass();
$("body").addClass(currentTheme);
}

// TODO: make this a mobile only change
/*let loading_greeting_msgs = ["Welcome.", "Bontehu!", "Breath.", "Coffee or Tea?", "Productivity!", "Look up!", "Ready? Go!", "Accomplish!"];*/
//let loading_greeting = loading_greeting_msgs[Math.floor(Math.random() * loading_greeting_msgs.length)];
Expand Down Expand Up @@ -71801,7 +71802,7 @@ $(document).on("click", "#perspective-documentaion", async function(e) {
await Browser.open({ url: 'https://condutiondocs.shabang.cf/Perspective-Menus-408aae7988a345c0912644267ccda4d2' });
});

Hammer($("#content-area")[0]).on('swiperight swipeleft', function (e) {
Hammer($("html")[0]).on('swiperight swipeleft', function (e) {
e.preventDefault();
const { x } = interfaceUtil.getStartSwipe(e);
//swipe right to open nav /* note the condition here */
Expand Down Expand Up @@ -72588,6 +72589,20 @@ var chrono = require('chrono-node');
}

this.$timeObj = $tp.find('.ui_tpicker_time_input');
// IMPT: Don't remove this, this is a scrolling patch
this.$timeObj.click(function() {
$(this).prop("readonly", false);
});
this.$timeObj.on("touchstart", function() {
$(this).prop("readonly", false);
$([document.documentElement, document.body]).animate({
scrollTop: $(this).offset().top
}, 1000);
});
this.$timeObj.blur(function() {
$(this).prop("readonly", true);
});
this.$timeObj.prop("readonly", true);
this.$timeObj.change(function () {
var timeFormat = tp_inst.inst.settings.timeFormat;
var parsedTime = $.datepicker.parseTime(timeFormat, this.value, $.datepicker);
Expand Down

0 comments on commit a20123e

Please sign in to comment.