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

给node加了个select下拉框,下拉不了元素. #281

Closed
withlin opened this issue May 14, 2020 · 2 comments
Closed

给node加了个select下拉框,下拉不了元素. #281

withlin opened this issue May 14, 2020 · 2 comments

Comments

@withlin
Copy link

withlin commented May 14, 2020

您想申请的是需求还是问题?
问题
目前的情况是什么?
给node加了个select下拉框,下拉不了元素.
预期的结果是什么?
让select里面的option可以下拉。
哪个butterfly版本在哪个浏览器/操作系统发生的错误?
master的版本,
请重现步骤,如果可以的话,请提供一个最小的演示案例。
在example的mindMap的node.js文件,修改了下代码如下:

class BaseNode extends Node {
  constructor(opts) {
    super(opts);
  }

  draw = (opts) => {
    let container = $('<div class="mind-map-node"></div>')
      .css('top', opts.top)
      .css('left', opts.left)
      .attr('id', opts.id);
    let titleDom = $(`<div class="title"><div>`);

    let select = $(`
    <div>
      <select class="selectBox">
      <option value="1">task1</option>
      <option value="2">task2</option>
      </select>
    </div>
    `);

    titleDom.append(select);


    container.append(titleDom);

    return container[0];
  }
}

/kind bug

@withlin
Copy link
Author

withlin commented May 14, 2020

ping @noonnightstorm

@withlin withlin changed the title 给node加了个slect下拉框,下拉不了元素. 给node加了个select下拉框,下拉不了元素. May 14, 2020
@withlin
Copy link
Author

withlin commented May 14, 2020

已经fix. 加入一个事件即可。防止事件向下传播。

@withlin withlin closed this as completed May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant