jimrrchen got review request #3000!
confirmation for leaving the page now only appears when the text in inlineEditor is actually changed, also fixed a bug with esc key not registered with inlineEditor
Review Request #3000 — Created March 22, 2012 and submitted
Confirmation for leaving the page now only appears when the text in inlineEditor is actually changed Also fixed a bug with esc key not registered with inlineEditor Changed the behaviour of the editor so now whenever the dirty state is changed a "dirtyStateChanged" event is triggered
Done in Linux environment with Chrome 17 and Firefox 11
Description | From | Last Updated |
---|---|---|
We have a dirty() function already. It seems it could just be updated to not assume dirty if in edit … |
chipx86 | |
This will break things. There's distinct differences in how codes come in from keydown and keypress, and what will go … |
chipx86 | |
All comments must use sentence capitalization and trailing periods. For multi-line comments, use: /* * comment line * ... */ |
chipx86 | |
So, what does trigger this now? It feels like this will cause API breakage. |
chipx86 | |
I know the old code wasn't styled right, but all jquery stuff should be like: $(el) .keydown(function(e) { }) .keyup(function(e) … |
chipx86 | |
"resets" Period at the end. |
chipx86 | |
Period at the end. |
chipx86 | |
No space before ":" |
chipx86 | |
I'd prefer "curDirtyState" rather than using "curr". |
chipx86 |
- Description:
-
Confirmation for leaving the page now only appears when the text in inlineEditor is actually changed
Also fixed a bug with esc key not registered with inlineEditor ~ Note: I am considering removing the dirty function at line 604, but I am not sure what "$(a).inlineEditor("dirty")" does on line 672. can anyone help?
~ Note: I am considering removing the dirty function at line 604, but I am not sure what "$(a).inlineEditor("dirty")" does on line 672.
+ it seems like $(a).inlineEditor("dirty") will invoke the dirty() function and I am thinking if there is a way to just use the _dirty field that I added instead of calling the dirty() function + any suggestions?
-
-
We have a dirty() function already. It seems it could just be updated to not assume dirty if in edit mode. In fact, I think the rest of the change in here could go away with that function being updated? iirc, our logic for determining whether to show the confirmation dialog on page leave is doing it based on a query using dirty(). I don't see where this ties in to that?
-
This will break things. There's distinct differences in how codes come in from keydown and keypress, and what will go to what. That's why we have the distinction between these events today. We can't change that.
-
All comments must use sentence capitalization and trailing periods. For multi-line comments, use: /* * comment line * ... */
-
- Change Summary:
-
Changed the behaviour of the editor so now whenever the dirty state is changed a "dirtyStateChanged" event is triggered
- Description:
-
Confirmation for leaving the page now only appears when the text in inlineEditor is actually changed
Also fixed a bug with esc key not registered with inlineEditor ~ Note: I am considering removing the dirty function at line 604, but I am not sure what "$(a).inlineEditor("dirty")" does on line 672.
~ Changed the behaviour of the editor so now whenever the dirty state is changed a "dirtyStateChanged" event is triggered
- it seems like $(a).inlineEditor("dirty") will invoke the dirty() function and I am thinking if there is a way to just use the _dirty field that I added instead of calling the dirty() function - any suggestions? - Diff:
-
Revision 2 (+27 -24)