fix dropdpwn selection in firefox

pull/1/head
yann300 7 years ago
parent ca84461448
commit 3b90f4c984
  1. 4
      src/app/tabs/compile-tab.js
  2. 6
      src/app/tabs/run-tab.js

@ -319,7 +319,7 @@ function compileTab (container, appAPI, appEvents, opts) {
function details () {
var select = el.querySelector('select')
if (select.children.length > 0 && select.selectedIndex >= 0) {
var contractName = select.children[select.selectedIndex].innerText
var contractName = select.children[select.selectedIndex].innerHTML
var details = contractsDetails[contractName]
var keys = Object.keys(contractsDetails[contractName])
var log = yo`<div class="${css.detailsJSON}"></div>`
@ -334,7 +334,7 @@ function compileTab (container, appAPI, appEvents, opts) {
function publish (appAPI) {
var selectContractNames = document.querySelector(`.${css.contractNames.classNames[0]}`)
if (selectContractNames.children.length > 0 && selectContractNames.selectedIndex >= 0) {
var contract = contractsDetails[selectContractNames.children[selectContractNames.selectedIndex].innerText]
var contract = contractsDetails[selectContractNames.children[selectContractNames.selectedIndex].innerHTML]
publishOnSwarm(contract, appAPI, function (err) {
if (err) {
alert('Failed to publish metadata: ' + err)

@ -278,7 +278,7 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
function setInputParamsPlaceHolder () {
createButtonInput.value = ''
if (appAPI.getContracts() && selectContractNames.selectedIndex >= 0 && selectContractNames.children.length > 0) {
var contract = appAPI.getContracts()[selectContractNames.children[selectContractNames.selectedIndex].innerText]
var contract = appAPI.getContracts()[selectContractNames.children[selectContractNames.selectedIndex].innerHTML]
var ctrabi = txHelper.getConstructorInterface(contract.interface)
if (ctrabi.inputs.length) {
createButtonInput.setAttribute('placeholder', txHelper.inputParametersDeclarationToString(ctrabi.inputs))
@ -296,7 +296,7 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
function createInstance () {
var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`)
var contracts = appAPI.getContracts()
var contract = appAPI.getContracts()[contractNames.children[contractNames.selectedIndex].innerText]
var contract = appAPI.getContracts()[contractNames.children[contractNames.selectedIndex].innerHTML]
var constructor = txHelper.getConstructorInterface(contract.interface)
var args = createButtonInput.value
txFormat.buildData(contract, contracts, true, constructor, args, appAPI.udapp(), appAPI.executionContext(), (error, data) => {
@ -338,7 +338,7 @@ function contractDropdown (appAPI, appEvents, instanceContainer) {
function loadFromAddress (appAPI) {
noInstancesText.style.display = 'none'
var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`)
var contract = appAPI.getContracts()[contractNames.children[contractNames.selectedIndex].innerText]
var contract = appAPI.getContracts()[contractNames.children[contractNames.selectedIndex].innerHTML]
var address = atAddressButtonInput.value
instanceContainer.appendChild(appAPI.udapp().renderInstance(contract, address, selectContractNames.value))
}

Loading…
Cancel
Save