Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] web: list editable create then escape #31342

Closed
wants to merge 1 commit into
base: 12.0
from

Conversation

Projects
None yet
4 participants
@kebeclibre
Copy link
Contributor

kebeclibre commented Feb 22, 2019

Have an editable list that begins with a date/time field
create a line.
The first field is focused and the datetimepicker is popped up

Now, stroke ESC key

Before this commit, there was a traceback because the datetimepicker received an erroneous
BLUR/INPUT event

After this commit, there is no traceback as we detroy the widgets of the line
(including the datetimepicker) before removing the row from the DOM

OPW 1932409

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@kebeclibre kebeclibre requested review from ged-odoo and aab-odoo Feb 22, 2019

@robodoo robodoo added the seen 🙂 label Feb 22, 2019

@C3POdoo C3POdoo added the OE label Feb 22, 2019

@robodoo robodoo added the CI 🤖 label Feb 22, 2019

@aab-odoo
Copy link
Contributor

aab-odoo left a comment

Besides my remark on the test, it's ok

addons/web/static/tests/views/list_tests.js Outdated

list.$('input.o_datepicker_input').trigger($.Event('keydown', {which: $.ui.keyCode.ESCAPE}));

assert.equal($('.o_list_button_add').length, 1,

This comment has been minimized.

@aab-odoo

aab-odoo Feb 22, 2019

Contributor

i'd rather check that there is no row with className o_selected_row or something. Or the number of rows.

So i'd do a sanity check before clicking on Add, and the same check after Add and after pressing Escape.

@kebeclibre kebeclibre force-pushed the odoo-dev:12.0-escape-editable-list-lpe branch Feb 25, 2019

@kebeclibre

This comment has been minimized.

Copy link
Contributor Author

kebeclibre commented Feb 25, 2019

@aab-odoo
changes made

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 25, 2019

[FIX] web: list editable create then escape
Have an editable list that begins with a date/time field
create a line.
The first field is focused and the datetimepicker is popped up

Now, stroke ESC key

Before this commit, there was a traceback because the datetimepicker received an erroneous
BLUR/INPUT event

After this commit, there is no traceback as we detroy the widgets of the line
(including the datetimepicker) before removing the row from the DOM

OPW 1932409

@aab-odoo aab-odoo force-pushed the odoo-dev:12.0-escape-editable-list-lpe branch to e3b010b Feb 26, 2019

@aab-odoo

This comment has been minimized.

Copy link
Contributor

aab-odoo commented Feb 26, 2019

robodoo r+

@robodoo robodoo added r+ 👌 CI 🤖 and removed CI 🤖 labels Feb 26, 2019

@robodoo robodoo closed this in 6530f12 Feb 26, 2019

@robodoo robodoo added merged 🎉 and removed merging 👷 labels Feb 26, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 26, 2019

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.