mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-19 01:31:38 +00:00
removed all the code that was compensating for the click/focus propagation bug...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2b4305aff7
commit
f4e161cc9d
@ -300,8 +300,8 @@ Files: <button id="theme" onclick="toggleFiles()">toggle</button>
|
|||||||
<br>
|
<br>
|
||||||
Basic key bindings:
|
Basic key bindings:
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>ctrl-a<code> - edit full path
|
<li><code>ctrl-a<code> - edit full path </li>
|
||||||
<li><code>ctrl-left<code> / <code>ctrl-Backspace<code> - go to root
|
<li><code>ctrl-left<code> / <code>ctrl-Backspace<code> - go to root </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -347,7 +347,6 @@ var BrowserPrototype = {
|
|||||||
//
|
//
|
||||||
// On more info on setting the path see .update(..)
|
// On more info on setting the path see .update(..)
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// NOTE: .path = <some-path> is equivalent to .update(<some-path>)
|
// NOTE: .path = <some-path> is equivalent to .update(<some-path>)
|
||||||
// both exist at the same time to enable chaining...
|
// both exist at the same time to enable chaining...
|
||||||
// NOTE: to avoid duplicating and syncing data, the actual path is
|
// NOTE: to avoid duplicating and syncing data, the actual path is
|
||||||
@ -465,32 +464,14 @@ var BrowserPrototype = {
|
|||||||
var txt
|
var txt
|
||||||
p.append($('<div>')
|
p.append($('<div>')
|
||||||
.addClass('dir cur')
|
.addClass('dir cur')
|
||||||
// XXX BUG: for some reason this element keeps the selection
|
|
||||||
// but looses focus in IE...
|
|
||||||
.click(function(){
|
.click(function(){
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
|
|
||||||
that.toggleFilter('on')
|
that.toggleFilter('on')
|
||||||
//that.update(path.concat($(this).text()))
|
//that.update(path.concat($(this).text()))
|
||||||
|
|
||||||
// XXX HACK: prevents the field from blurring when clicked...
|
|
||||||
that._hold_blur = true
|
|
||||||
setTimeout(function(){ delete that._hold_blur }, 20)
|
|
||||||
|
|
||||||
// XXX HACK: this will work around double triggering of the focus
|
|
||||||
// event after a click happens...
|
|
||||||
that._focus_hold = true
|
|
||||||
|
|
||||||
setTimeout(function(){ console.log('>>>', $(':focus')[0]) }, 1000)
|
|
||||||
})
|
})
|
||||||
// XXX for some reason this gets triggered when clicking ano
|
|
||||||
// is not triggered when entering via '/'
|
|
||||||
.on('blur', function(){
|
.on('blur', function(){
|
||||||
// XXX HACK: prevents the field from bluring when clicked...
|
|
||||||
// ...need to find a better way...
|
|
||||||
if(!that._hold_blur){
|
|
||||||
that.toggleFilter('off')
|
that.toggleFilter('off')
|
||||||
}
|
|
||||||
})
|
})
|
||||||
/* XXX does the right thing (replaces the later .focus(..)
|
/* XXX does the right thing (replaces the later .focus(..)
|
||||||
* and .keyup(..)) but does not work in IE...
|
* and .keyup(..)) but does not work in IE...
|
||||||
@ -499,16 +480,7 @@ var BrowserPrototype = {
|
|||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
// only update if text changed...
|
// only update if text changed...
|
||||||
// XXX for some reason this gets triggered when clicking ano
|
|
||||||
// is not triggered when entering via '/'
|
|
||||||
.focus(function(){
|
.focus(function(){
|
||||||
// XXX HACK: this will work around double triggering of the focus
|
|
||||||
// event after a click happens...
|
|
||||||
if(that._focus_hold){
|
|
||||||
delete that._focus_hold
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
txt = $(this).text()
|
txt = $(this).text()
|
||||||
})
|
})
|
||||||
.keyup(function(){
|
.keyup(function(){
|
||||||
@ -1111,6 +1083,8 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// Push an element to path / go down one level...
|
// Push an element to path / go down one level...
|
||||||
//
|
//
|
||||||
|
// NOTE: if the element is not traversable it will be opened.
|
||||||
|
//
|
||||||
// XXX might be a good idea to add a live traversable check...
|
// XXX might be a good idea to add a live traversable check...
|
||||||
// XXX revise event...
|
// XXX revise event...
|
||||||
push: function(pattern){
|
push: function(pattern){
|
||||||
@ -1178,8 +1152,6 @@ var BrowserPrototype = {
|
|||||||
//
|
//
|
||||||
// This opens (.open(..)) the selected item and if none are selected
|
// This opens (.open(..)) the selected item and if none are selected
|
||||||
// selects the default (.select()) and exits.
|
// selects the default (.select()) and exits.
|
||||||
//
|
|
||||||
// XXX need to check if openable i.e. when to use open and when push...
|
|
||||||
action: function(){
|
action: function(){
|
||||||
var elem = this.select('!')
|
var elem = this.select('!')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user