Skip to content

Indicatorでパラメータにpromiseを渡した時、そのpromiseについてcommonFailHandlerが動作しなくなる #211

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

Closed
fukudayasuo opened this issue May 29, 2013 · 1 comment
Assignees
Milestone

Comments

@fukudayasuo
Copy link

indicatorのオプションでpromsieを渡すとそのpromiseのついてのcommonFailHandler(以下CFH)が動作しなくなる。

// CFH設定済み
var dfd = h5.async.deferred();
var p = dfd.promise();
var indicator = h5.ui.indicator(document, {promises: p});
dfd.reject();
// CFHが動作しない

FW内部でfailハンドラが付加され、CFHを呼び出すフラグが無くなってしまうためである。
#210 で追加した_h5UnwrappedCallを使用するよう修正する。

@ghost ghost assigned fukudayasuo May 29, 2013
@simdy
Copy link
Member

simdy commented May 29, 2013

ver.1.1.4では、Deferredの実装のバグによりindicatorにpromiseを渡しても、そのpromiseにfailハンドラを設定しなければCFHが動作していた。
ver.1.1.5でDeferredの実装が変わったため、promiseを渡すと常にCFHが動作しないようになった。

indicatorに画面表示を自動的に消すように設定しただけでCFHが動作しなくなる挙動は
開発者にとって使いづらい場面の方が多いので、indicatorの仕様として
CFHの動作を阻害しないことを明確にし、そのように動作するようにする。
(結果として、ver.1.1.4までの動作に戻ることとなる。)

fukudayasuo pushed a commit to hifive-labs/hifivemain that referenced this issue May 31, 2013
@simdy simdy closed this as completed Jun 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants