OSDN Git Service
(root)
/
pettanr
/
clientJs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.6.176, add X.Script.
[pettanr/clientJs.git]
/
0.6.x
/
js
/
01_core
/
21_XViewPort.js
diff --git
a/0.6.x/js/01_core/21_XViewPort.js
b/0.6.x/js/01_core/21_XViewPort.js
index
c1a1760
..
7c29e7d
100644
(file)
--- a/
0.6.x/js/01_core/21_XViewPort.js
+++ b/
0.6.x/js/01_core/21_XViewPort.js
@@
-75,7
+75,7
@@
X_ViewPort = X_Class_override(
case 'blur' :
case 'focusout' :
case 'blur' :
case 'focusout' :
- if( X_UA[ 'IE' ] < 9 ){
+ if(
5 < X_UA[ 'IE' ] &&
X_UA[ 'IE' ] < 9 ){
xnode = X_Node_getXNode( document.activeElement );
if( xnode ){
xnode[ 'listenOnce' ]( [ 'focus', 'blur' ], X_ViewPort_detectFocusForIE );
xnode = X_Node_getXNode( document.activeElement );
if( xnode ){
xnode[ 'listenOnce' ]( [ 'focus', 'blur' ], X_ViewPort_detectFocusForIE );
@@
-107,15
+107,23
@@
X_ViewPort = X_Class_override(
);
function X_ViewPort_detectFocusForIE( e ){
);
function X_ViewPort_detectFocusForIE( e ){
- console.log( 'iefix! ' + e.type + ':' + this.attr( 'tag' ) + ' isActive?:' + ( this[ '_rawObject' ] === document.activeElement ) );
-
+
//
console.log( 'iefix! ' + e.type + ':' + this.attr( 'tag' ) + ' isActive?:' + ( this[ '_rawObject' ] === document.activeElement ) );
+ var elmActive = X_Script_try( X_Object_find, [ document, 'activeElement' ] );
X_ViewPort_active = e.type === 'focus';
X_ViewPort_active = e.type === 'focus';
- if( this[ '_rawObject' ] !== document.activeElement ){
+
+ if( elmActive && this[ '_rawObject' ] !== elmActive ){
this[ 'unlisten' ]( X_ViewPort_active ? 'blur' : 'focus', X_ViewPort_detectFocusForIE );
this[ 'unlisten' ]( X_ViewPort_active ? 'blur' : 'focus', X_ViewPort_detectFocusForIE );
+ console.log( '>>>>>> activeElement 取得 不一致 ' + this._tag );
+ } else
+ if( !elmActive ){
+ console.log( '******** activeElement 取得のエラー' );
+ } else if( elmActive ){
+ console.log( '>>>>>> activeElement 取得' );
};
};
+
if( X_ViewPort_activeTimerID ){
if( X_ViewPort_activeTimerID ){
- X_
ViewPort_activeTimerID = X_
Timer_remove( X_ViewPort_activeTimerID );
+ X_Timer_remove( X_ViewPort_activeTimerID );
};
X_ViewPort_activeTimerID = X_Timer_once( 16, X_ViewPort_changeFocus );
};
X_ViewPort_activeTimerID = X_Timer_once( 16, X_ViewPort_changeFocus );
@@
-251,8
+259,8
@@
X[ 'ViewPort' ] = {
//(((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.ScrollLeft == 'number' ? t : document.body).ScrollLeft;
//(((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.ScrollTop == 'number' ? t : document.body).ScrollTop
//(((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.ScrollLeft == 'number' ? t : document.body).ScrollLeft;
//(((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.ScrollTop == 'number' ? t : document.body).ScrollTop
- /
*
- * TODO X.Doc へ
+ /
/ TODO X.Doc へ
+ /**
* @alias X.ViewPort.getDocumentSize
*/
'getDocumentSize' : function(){
* @alias X.ViewPort.getDocumentSize
*/
'getDocumentSize' : function(){
@@
-595,12
+603,12
@@
if( X_UA_EVENT.W3C ){
} else
if( 6 <= X_UA[ 'IE' ] && X[ 'inHead' ] && !X_UA[ 'ieExeComError' ] ){ // standalone の除外 -> && !X_UA[ 'ieExeComError' ]
// if this script in Head
} else
if( 6 <= X_UA[ 'IE' ] && X[ 'inHead' ] && !X_UA[ 'ieExeComError' ] ){ // standalone の除外 -> && !X_UA[ 'ieExeComError' ]
// if this script in Head
- document.write( '<script id=__ieonload defer src=javascript:void(0)></script>' );
- X_TEMP._script = document.getElementById( '__ieonload' );
+
//
document.write( '<script id=__ieonload defer src=javascript:void(0)></script>' );
+
//
X_TEMP._script = document.getElementById( '__ieonload' );
// 上のコードはスタンドアローン版ie6でエラー
// 上のコードはスタンドアローン版ie6でエラー
-
//
X_TEMP._script = document.createElement( '<script id=__ieonload defer src=javascript:void(0)></script>' ) ;
-
//
document.getElementsByTagName( 'head' )[ 0 ].appendChild( X_TEMP._script );
+ X_TEMP._script = document.createElement( '<script id=__ieonload defer src=javascript:void(0)></script>' ) ;
+ document.getElementsByTagName( 'head' )[ 0 ].appendChild( X_TEMP._script );
X_TEMP._script.onreadystatechange = function(){
var s = X_TEMP._script;
X_TEMP._script.onreadystatechange = function(){
var s = X_TEMP._script;