NG Launch Instance: load script sometimes doesn't show in text area

Bug #1522067 reported by Kelly Domico
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Itxaka Serrano

Bug Description

Using the Angular Launch Instance, when in the Configuration step, sometimes the script content is not loaded into the "Customization Script" textarea.

To reproduce:

1. Enter some text "123456".
2. Load a script from file. The content should appear in textarea.
3. Select all of the content in the textarea and enter "123456".
4. Now, try loading a different script from file again. The content of the script doesn't show up in the textarea.

Testing in browsers: Safari and Chrome

Works fine in Firefox

Tags: angularjs
Revision history for this message
Itxaka Serrano (itxaka) wrote :

I can reproduce it by selecting the same file after deleting the text. Selecting a different file for upload will work and clean up the textarea, but selecting the same file will not do anything.

1. Enter any text
2. Select a script from a file
3. Select all text and delete it or modify it
4. Select the same file to upload

What should happen?
Script should be refreshed

What happens?
Old text is still in there.

Changed in horizon:
status: New → Confirmed
Revision history for this message
Itxaka Serrano (itxaka) wrote :

Seems that this is expected as its the standard:

http://www.w3.org/TR/html4/interact/scripts.html#adef-onchange

The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA.

Seems that Firefox is the only one not respecting the standard and firing and onchange event when the same script is selected.

Changed in horizon:
assignee: nobody → Itxaka Serrano (itxakaserrano)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/258477

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

I can't recreate this in Chrome on master

tags: added: angularjs
Changed in horizon:
status: In Progress → Incomplete
Changed in horizon:
status: Incomplete → In Progress
Revision history for this message
Itxaka Serrano (itxaka) wrote :

I can still recreate this with Chrome, and we should be able to reproduce it constantly as its the standard, unless chrome suddenly changed something on their javascript engine.

Changed in horizon:
importance: Undecided → Low
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/258477
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d2692ef801045070858f5e6ea7f3e95a468cb5c4
Submitter: Jenkins
Branch: master

commit d2692ef801045070858f5e6ea7f3e95a468cb5c4
Author: Itxaka <email address hidden>
Date: Wed Dec 16 13:53:17 2015 +0100

    NG launch instance: Clear fileInput value on text change

    The onchange event occurs when a control loses the input
    focus and its value has been modified since gaining focus.
    This attribute applies to the following elements:
    INPUT, SELECT, and TEXTAREA.
    http://www.w3.org/TR/html4/interact/scripts.html#adef-onchange

    This affected uploading a script and modifying it, as it would
    not allow to reupload it again.
    This patch cleans the fileInput.val() on textInput change so
    a user can upload a script, modify it, and reupload the same
    script again if he wants to start from a clean scratch again

    Change-Id: Ie2d29de4ebcdea07f7e3e2ce6c7094c1d2fe5e10
    Closes-Bug: #1522067

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.