opakornpko / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

[want] hover only inline editor #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For our current application I changed the behaviour of the inline editor quite 
substantially by 
showing the inline editing ui only while the mouse hovers on the text. (To give 
the users 
additional hints that they can change this value).

I was able to implement this by submitting to a function (I needed that 
anyway), discarding the 
edit if it didn't change anything and adding this jquery code beforehand:

    showAndHideInlineEditorsOnHover: function() {
        this.dom('span').hover(
            function(){ $(this).click(); }, 
            function(){ $(this).find(':input').submit(); });
    },

All editables are in span.

However this is so useful that I gather this should be inside the plugin proper.

Regards,
Martin

Original issue reported on code.google.com by mhaec...@gmail.com on 23 Nov 2009 at 3:23

GoogleCodeExporter commented 8 years ago
Well, I discovered that it's quite easy to crash IE when doing this, so I have 
deferred further work on this for a 
bit. You can see my experiments here though: 
http://haecker.me/trac/blog/2009/12/crash-ie7-with-javascript

If somebody can tell me how to work around this - please speek up.

Original comment by mhaec...@gmail.com on 28 Mar 2010 at 5:06