mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(log): use console.log instead of .debug
Console statements get removed during builds, but when testing IE 10 does not support console.debug.
This commit is contained in:
@@ -60,9 +60,9 @@ function keyboardSetShow(e) {
|
||||
clearTimeout(keyboardFocusOutTimer);
|
||||
|
||||
keyboardFocusInTimer = setTimeout(function(){
|
||||
if ( keyboardLastShow + 350 > Date.now() ) return;
|
||||
if ( keyboardLastShow + 350 > Date.now() ) return;
|
||||
keyboardLastShow = Date.now();
|
||||
var keyboardHeight;
|
||||
var keyboardHeight;
|
||||
var elementBounds = keyboardActiveElement.getBoundingClientRect();
|
||||
var count = 0;
|
||||
|
||||
@@ -79,8 +79,8 @@ function keyboardSetShow(e) {
|
||||
clearInterval(pollKeyboardHeight);
|
||||
}
|
||||
count++;
|
||||
|
||||
}, 100);
|
||||
|
||||
}, 100);
|
||||
}, 32);
|
||||
}
|
||||
|
||||
@@ -96,12 +96,12 @@ function keyboardShow(element, elementTop, elementBottom, viewportHeight, keyboa
|
||||
|
||||
details.contentHeight = viewportHeight - keyboardHeight;
|
||||
|
||||
console.debug('keyboardShow', keyboardHeight, details.contentHeight);
|
||||
console.log('keyboardShow', keyboardHeight, details.contentHeight);
|
||||
|
||||
// distance from top of input to the top of the keyboard
|
||||
details.keyboardTopOffset = details.elementTop - details.contentHeight;
|
||||
|
||||
console.debug('keyboardTopOffset', details.elementTop, details.contentHeight, details.keyboardTopOffset);
|
||||
console.log('keyboardTopOffset', details.elementTop, details.contentHeight, details.keyboardTopOffset);
|
||||
|
||||
// figure out if the element is under the keyboard
|
||||
details.isElementUnderKeyboard = (details.elementBottom > details.contentHeight);
|
||||
@@ -132,7 +132,7 @@ function keyboardFocusOut(e) {
|
||||
}
|
||||
|
||||
function keyboardHide() {
|
||||
console.debug('keyboardHide');
|
||||
console.log('keyboardHide');
|
||||
ionic.keyboard.isOpen = false;
|
||||
|
||||
ionic.trigger('resetScrollView', {
|
||||
@@ -177,10 +177,10 @@ function keyboardOrientationChange() {
|
||||
}
|
||||
|
||||
updatedViewportHeight = window.innerHeight;
|
||||
|
||||
|
||||
if (updatedViewportHeight !== keyboardViewportHeight){
|
||||
if (updatedViewportHeight < keyboardViewportHeight){
|
||||
ionic.keyboard.landscape = true;
|
||||
ionic.keyboard.landscape = true;
|
||||
}
|
||||
else {
|
||||
ionic.keyboard.landscape = false;
|
||||
@@ -193,7 +193,7 @@ function keyboardOrientationChange() {
|
||||
}, 50);
|
||||
}
|
||||
else {
|
||||
keyboardViewportHeight = updatedViewportHeight;
|
||||
keyboardViewportHeight = updatedViewportHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ function tapClick(e) {
|
||||
|
||||
var c = getPointerCoordinates(e);
|
||||
|
||||
console.debug('tapClick', e.type, ele.tagName, '('+c.x+','+c.y+')');
|
||||
console.log('tapClick', e.type, ele.tagName, '('+c.x+','+c.y+')');
|
||||
triggerMouseEvent('click', ele, c.x, c.y);
|
||||
|
||||
// if it's an input, focus in on the target, otherwise blur
|
||||
@@ -240,7 +240,7 @@ function tapClickGateKeeper(e) {
|
||||
// do not allow through any click events that were not created by ionic.tap
|
||||
if( (ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target) ) ||
|
||||
(!e.isIonicTap && !ionic.tap.requiresNativeClick(e.target)) ) {
|
||||
console.debug('clickPrevent', e.target.tagName);
|
||||
console.log('clickPrevent', e.target.tagName);
|
||||
e.stopPropagation();
|
||||
|
||||
if( !ionic.tap.isLabelWithTextInput(e.target) ) {
|
||||
@@ -256,7 +256,7 @@ function tapMouseDown(e) {
|
||||
if(e.isIonicTap || tapIgnoreEvent(e)) return;
|
||||
|
||||
if(tapEnabledTouchEvents) {
|
||||
console.debug('mousedown', 'stop event');
|
||||
console.log('mousedown', 'stop event');
|
||||
e.stopPropagation();
|
||||
|
||||
if( !ionic.tap.isTextInput(e.target) ) {
|
||||
@@ -412,7 +412,7 @@ function tapHandleFocus(ele) {
|
||||
function tapFocusOutActive() {
|
||||
var ele = tapActiveElement();
|
||||
if(ele && (/input|textarea|select/i).test(ele.tagName) ) {
|
||||
console.debug('tapFocusOutActive', ele.tagName);
|
||||
console.log('tapFocusOutActive', ele.tagName);
|
||||
ele.blur();
|
||||
}
|
||||
tapActiveElement(null);
|
||||
@@ -432,7 +432,7 @@ function tapFocusIn(e) {
|
||||
// 2) There is an active element which is a text input
|
||||
// 3) A text input was just set to be focused on by a touch event
|
||||
// 4) A new focus has been set, however the target isn't the one the touch event wanted
|
||||
console.debug('focusin', 'tapTouchFocusedInput');
|
||||
console.log('focusin', 'tapTouchFocusedInput');
|
||||
tapTouchFocusedInput.focus();
|
||||
tapTouchFocusedInput = null;
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
//middle of the scrollview, where we want to scroll to
|
||||
var scrollViewMidpointOffset = container.clientHeight * 0.5;
|
||||
var scrollTop = e.detail.keyboardTopOffset + scrollViewMidpointOffset;
|
||||
console.debug('scrollChildIntoView', scrollTop);
|
||||
console.log('scrollChildIntoView', scrollTop);
|
||||
ionic.tap.cloneFocusedInput(container, self);
|
||||
self.scrollBy(0, scrollTop, true);
|
||||
self.onScroll();
|
||||
|
||||
Reference in New Issue
Block a user